Hi,
I wonder if there is a way to combine fuzzy match and Phrase search within text.
EG of searching pattern:
"combime phrases and fuzsy matsh"
Would match
"combine phrases and fuzzy match"
Thanks for your answer !
Hi,
I wonder if there is a way to combine fuzzy match and Phrase search within text.
EG of searching pattern:
"combime phrases and fuzsy matsh"
Would match
"combine phrases and fuzzy match"
Thanks for your answer !
It appears, not directly with match_phrase
directly:
Fuzziness works only with the basic match and multi_match queries. It doesn’t work with phrase matching, common terms, or cross_fields matches.
You could probably get close with a set of Span queries
The span_multi query allows you to wrap a multi term query (one of wildcard, fuzzy, prefix, range or regexp query) as a span query, so it can be nested.
Span queries let you specify how far positionally child queries should be apart. So they can be used to build smarter phrase queries. In this case, you would need to do client side work preparse and organize a large span query with sub fuzzy queries for each term. More work, but doable.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.