Phrase match on an index analyzed with stemmer

I have my index analyzed using a stemmer but I wanted to know if I can search for phrases without inflectional forms.

es.indices.create(index='bhar',body = { "settings":{ "analysis":{ "analyzer":{ "my_stop_analyzer":{ "type":"custom", "tokenizer":"standard", "filter":["english_possessive_stemmer","lowercase","english_stop","english_stemmer"] } }, "filter":{ "english_stop":{ "type":"stop", "stopwords":"_english_" }, "english_stemmer":{ "type":"stemmer", "name":"english" }, "english_possessive_stemmer": { "type": "stemmer", "language": "possessive_english" } } } }, "mappings":{ "my_type":{ "properties":{ "test": { "type":"text", "analyzer" : "my_stop_analyzer" } } } } })

And one record has data that is " picks towering".
When I search for "pick tower", it still gives me a result with match_phrase which I wrote like this:
scroll = elasticsearch.helpers.scan(es, query={"query":{"match_phrase":{ "test":{"query":"pick rule"} } }}, index='bhar', scroll='100s')

Is there any way I can get only the exact match of the phrase? Thank you

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