문제

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