Class SpanWithinQuery

All Implemented Interfaces:
Cloneable

public final class SpanWithinQuery extends SpanContainQuery
Keep matches that are contained within another Spans.
  • Constructor Details

    • SpanWithinQuery

      public SpanWithinQuery(SpanQuery big, SpanQuery little)
      Construct a SpanWithinQuery matching spans from little that are inside of big. This query has the boost of little. big and little must be in the same field.
  • Method Details

    • toString

      public String toString(String field)
      Description copied from class: Query
      Prints a query to a string, with field assumed to be the default field and omitted.
      Specified by:
      toString in class Query
    • createWeight

      public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
      Description copied from class: Query
      Expert: Constructs an appropriate Weight implementation for this query.

      Only implemented by primitive queries, which re-write to themselves.

      Specified by:
      createWeight in class SpanQuery
      Parameters:
      scoreMode - How the produced scorers will be consumed.
      boost - The boost that is propagated by the parent queries.
      Throws:
      IOException