Class SpanContainingQuery

  • All Implemented Interfaces:
    java.lang.Cloneable

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

      • 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 Detail

      • toString

        public java.lang.String toString​(java.lang.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 java.io.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:
        java.io.IOException