olivere / elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch
https://olivere.github.io/elastic/
MIT License
7.36k stars 1.15k forks source link

Parameter `auto_generate_synonyms_phrase_query` is not implemented #1619

Open drussier opened 2 years ago

drussier commented 2 years ago

Which version of Elastic are you using?

v7.0.27

Please describe the expected behavior

The parameter auto_generate_synonyms_phrase_query is not implemented in Match and MultiMatch queries : https://github.com/olivere/elastic/blob/29ee98974cf1984dfecf53ef772d721fb97cb0b9/search_queries_match.go#L16 https://github.com/olivere/elastic/blob/29ee98974cf1984dfecf53ef772d721fb97cb0b9/search_queries_multi_match.go#L16

It is necessary to use the synonym_graph filter.

See ES documentation that mentions the parameter https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#match-field-params https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#type-best-fields

drussier commented 2 years ago

@olivere PR opened here https://github.com/olivere/elastic/pull/1620