Class SpanNearQueryBuilder

java.lang.Object
org.elasticsearch.index.query.AbstractQueryBuilder<SpanNearQueryBuilder>
org.elasticsearch.index.query.SpanNearQueryBuilder
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>, SpanQueryBuilder

public class SpanNearQueryBuilder
extends AbstractQueryBuilder<SpanNearQueryBuilder>
implements SpanQueryBuilder
Matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order. The span near query maps to Lucene SpanNearQuery.
  • Field Details

    • NAME

      public static final java.lang.String NAME
      See Also:
      Constant Field Values
    • DEFAULT_IN_ORDER

      public static boolean DEFAULT_IN_ORDER
      Default for flag controlling whether matches are required to be in-order
    • DEFAULT_SLOP

      public static int DEFAULT_SLOP
      Default slop value, this is the same that lucene SpanNearQuery uses if no slop is provided
  • Constructor Details

    • SpanNearQueryBuilder

      public SpanNearQueryBuilder​(SpanQueryBuilder initialClause, int slop)
      Parameters:
      initialClause - an initial span query clause
      slop - controls the maximum number of intervening unmatched positions permitted
    • SpanNearQueryBuilder

      public SpanNearQueryBuilder​(StreamInput in) throws java.io.IOException
      Read from a stream.
      Throws:
      java.io.IOException
  • Method Details