Hi All,
I am trying to use *edge-ngram filter *to achieve auto-completion
behaviour. However when i run the following query :
{
"from" : "0",
"size" : "20",
"explain" : true,
"query" : {
*"multi_match": {*
* "query": "happy",*
* "fields": [ "DISPLAY_NAME.NAME"]*
* }*
},
"sort" : [{
"_score" : { "order" : "desc"}}]
}
It returns me documents :
https://gist.github.com/cheehoo/11365794
May i know how can i achieve the behaviour when i search "*happy*" then is
should return me following result instead :
*1)Happy*
*2)Happy birthday*
*3)Happy valentine*
The analzyer configure :
"analysis" : {
"analyzer" : {
"edge_ngram_keyword_lowercase_analyzer" : {
"tokenizer" : "keyword",
"filter" : ["my_edge_ngram_filter","lowercase"]
}
},
"filter" : {
"my_edge_ngram_filter" : {
"type" : "edgeNGram",
"min_gram" : "2",
"max_gram" : "30"
}
}
}
The mapping :
https://gist.github.com/cheehoo/11365917
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e8a4446c-38c9-4c6b-8d2a-15374ef041a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.