Hi,
I follow step by step here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html
The data I input is:
curl -X PUT 'localhost:9200/music/song/1?refresh=true' -d '{
"name" : "Nevermind",
"suggest" : {
"input": [ "Nevermind XYZ", "Nirvana ABC" ],
"output": "Nirvana - Nevermind X",
"payload" : { "artistId" : 2321 },
"weight" : 34
}
}'
I try to suggest with :
curl -X POST 'localhost:9200/music/_suggest?pretty' -d '{
"song-suggest" : {
"text" : "nevermind x",
"completion" : {
"field" : "suggest"
}
}
}'
Then it's ok.
My current suggest system (which refer from Cleo) could suggest at the
middle of phrase (not only prefix).
ex: when user suggest for "xy", the suggest system should output "Nirvana -
Nevermind X" because it match "Nevermind XYZ"
To do it, currently I enrich my data when indexing, ex:
When user index: "Nevermind XYZ ABC DEF"
I will split word and index: "Nevermind XYZ ABC DEF", "XYZ ABC DEF", "ABC
DEF", "DEF".
I would prefer another way to do it, I have tried by set custom tokenizer
etc ... but I don't success yet.
Would anyone help me on this situation ?
I really appreciate your help.
Thanks.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.