Synonym search in dictionary elasticsearch not result

Hi all,
I want use synonym filter for search, my config

analysis: { filter: { synonym_filter: { type: "synonym", synonyms: [ "tp, saigon, sai gon, hcm, tphcm, sài gòn, sàigòn => Thành phố Hồ Chí Minh", "tp, hn, ha noi, noi ha => Hà Nội" ] } }, analyzer: { synonym_analyzer: { filter: [ "standard", "synonym_filter", "lowercase", "asciifolding" ], type: "custom", tokenizer: "whitespace" } } }

But when i search:
{ "query": { "multi_match": { "query": "tp", "type": "best_fields", "fields": [ "name" ], "operator": "and" } } }

Elastic only result one doc "Thành phố Hồ Chí Minh". Could u tell me why and how to fix it.
Thanks all.

Hi,

Can you get the mapping of your index?
And can you explain your data in your index?
There is no information how many data you have, what you expect your query, etc...

Thanks for your reply, i had fixed it :slight_smile:

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