Query_string on n-gram field

(Alex Ugol) #1

Hi all,

I'm trying to use a query_string on a field which has a n-gram analyzer, this is the behavior i'm seeing:

Assuming my doc contains the field:
"my_field": "abcd"

the nGram tokenizer is configured:
"min_gram" : "3",
"max_gram" : "3"

And the query_string input is: "abc" results in the desired doc.

Searching for "abce" also returns the doc with "abcd"!

Is there a way to do searches on n-gram fields that return only 100% match on the input, so that 'abc', 'abcd' will return the doc, but 'abce' won't?

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.