Class SpanNearQuery

  • All Implemented Interfaces:
    Cloneable

    public class SpanNearQuery
    extends SpanQuery
    implements Cloneable
    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.
    • Field Detail

      • slop

        protected int slop
      • inOrder

        protected boolean inOrder
      • field

        protected String field
    • Constructor Detail

      • SpanNearQuery

        public SpanNearQuery​(SpanQuery[] clausesIn,
                             int slop,
                             boolean inOrder)
        Construct a SpanNearQuery. Matches spans matching a span from each clause, with up to slop total unmatched positions between them.
        When inOrder is true, the spans from each clause must be in the same order as in clauses and must be non-overlapping.
        When inOrder is false, the spans from each clause need not be ordered and may overlap.
        Parameters:
        clausesIn - the clauses to find near each other, in the same field, at least 2.
        slop - The slop value
        inOrder - true if order is important