Class SpanContainingQuery

All Implemented Interfaces:
Cloneable

public final class SpanContainingQuery extends SpanContainQuery
Keep matches that contain another SpanScorer.
  • Constructor Details

    • SpanContainingQuery

      public SpanContainingQuery(SpanQuery big, SpanQuery little)
      Construct a SpanContainingQuery matching spans from big that contain at least one spans from little. This query has the boost of big. 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
      scoreMode - How the produced scorers will be consumed.
      boost - The boost that is propagated by the parent queries.
      Throws:
      IOException