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.SpanWithinQuery
- All Implemented Interfaces:
Cloneable
Keep matches that are contained within another Spans.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Creates SpanWithinQuery 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
ConstructorsConstructorDescriptionSpanWithinQuery
(SpanQuery big, SpanQuery little) Construct a SpanWithinQuery matching spans fromlittle
that are inside ofbig
. -
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
-
SpanWithinQuery
Construct a SpanWithinQuery matching spans fromlittle
that are inside ofbig
. This query has the boost oflittle
.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
-