Skip to content

ES equivalent of lucene SpanNearQuery.Builder.addGap(int)  #27862

@Chandan83

Description

@Chandan83

Lucene's SpanNearQuery.Builder.addGap(int) serves an important search criteria. Especially with slop=0, it acts as arbitrary gap between two clauses just like the gaps created by removal of stop words in a phrase search. ES does not provide a similar Java API. Infact, even the lucene's way of introducing a gap in phrase search by PhraseQuery.Builder.add(Term term, int gap), used after filtering stop words, is missing in ES. Have I overlooked any existing ES way of introducing such behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions