How can we implement ngram_anlyzer without affecting the phrase_search


(Anand kumar) #1

Hi,

I want to search the ngram analyzed data without being affected the results
of phrase search.

If I used the ngram analyzer, it affects the phrase search results. For
instance, I'm querying for the string "phrase query", it would display the
results for exact match, instead it outputs match for "phrase" and "query".
Here are the settings I've been using, what should be done to get the
desired result.

"settings" : {
"index": {
"analysis" : {
"analyzer" : {
"my_ngram_analyzer" : {
"tokenizer" : ["my_ngram_tokenizer", "whitespace"],
"filter" : "lowercase"
}
},
"tokenizer" : {
"my_ngram_tokenizer" : {
"type" : "nGram",
"min_gram" : "3",
"max_gram" : "20",
"token_chars": [ "letter", "digit" ]
}
}
}
}

}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c60981f8-d2f1-417e-bc32-170390fed9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2