ES 7.0 introduced support for the Lucene intervals query which is more powerful and easier to deal with than span queries (analyzer support, etc). However, one thing that span queries support and intervals doesn't is fuzziness. Since the intervals query is supposed to help in legal and patent search, I have a hard time understanding how this could be possible without fuzziness support.
I could not find much information about that when browsing the Githubissues. Is there any reason why the intervals query doesn't support fuzziness? (because Lucene doesn't maybe)? Is it on the roadmap?
Here was a another sample case where fuzziness support in intervals query could come in handy.
@Mikhail_Khludnev, @Adrien_Grand, I totally agree with @val. Even I need to use Fuzzy support with interval queries. Could you please suggest something?
I think it's worth opening an issue in Elasticsearch and we'll discuss where the support should land (Elasticsearch or Lucene). As @Mikhail_Khludnev suggested it should be easy to make fuzzy intervals in Elasticsearch using the MultiTermIntervalsSource except that it is not exposed . Queries that need to check positions cannot handle large number of multi-terms so we have some logic to restrict to those that expand to less than a provided threshold (bounded to 1024). With this protection in place I don't see why we should not expose them more simply in Lucene.
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.