Вопрос

Unlike the "query_string" operator, the "fuzzy_like_this" doesn't have a "default_operator" I can set to "AND", which results in a much larger result set than desired for a multi-term search like "chicken breast".

Is there an alternative way to accomplish this functionality? Like pre-splitting the search tokens and AND'ing a bunch of fuzzy_like_this blocks together? Or preferably something simpler and more intuitive?

http://www.elasticsearch.org/guide/reference/query-dsl/flt-query.html

Это было полезно?

Решение

Unless I missed something in your requirements, what you are looking for is match_query. It supports AND operator which will require all terms to match the record. Alternatively, you can specify the number or percentage of terms that has to match using minimum_should_match parameter.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top