java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.spans.SpanQuery
org.apache.lucene.queries.spans.SpanContainQuery
org.apache.lucene.queries.spans.SpanContainingQuery
- All Implemented Interfaces:
Cloneable
Keep matches that contain another SpanScorer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Creates SpanContainingQuery scorer instancesNested classes/interfaces inherited from class org.apache.lucene.queries.spans.SpanContainQuery
SpanContainQuery.SpanContainWeight
-
Field Summary
Fields inherited from class org.apache.lucene.queries.spans.SpanContainQuery
big, little
-
Constructor Summary
ConstructorsConstructorDescriptionSpanContainingQuery
(SpanQuery big, SpanQuery little) Construct a SpanContainingQuery matching spans frombig
that contain at least one spans fromlittle
. -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(IndexSearcher searcher, ScoreMode scoreMode, float boost) Expert: Constructs an appropriate Weight implementation for this query.Prints a query to a string, withfield
assumed to be the default field and omitted.Methods inherited from class org.apache.lucene.queries.spans.SpanContainQuery
equals, getBig, getField, getLittle, hashCode, rewrite, toString, visit
Methods inherited from class org.apache.lucene.queries.spans.SpanQuery
getTermStates, getTermStates
Methods inherited from class org.apache.lucene.search.Query
classHash, sameClassAs, toString
-
Constructor Details
-
SpanContainingQuery
Construct a SpanContainingQuery matching spans frombig
that contain at least one spans fromlittle
. This query has the boost ofbig
.big
andlittle
must be in the same field.
-
-
Method Details
-
toString
Description copied from class:Query
Prints a query to a string, withfield
assumed to be the default field and omitted. -
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 classSpanQuery
scoreMode
- How the produced scorers will be consumed.boost
- The boost that is propagated by the parent queries.- Throws:
IOException
-