Package org.apache.lucene.queries.spans
Class SpanContainingQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.spans.SpanQuery
org.apache.lucene.queries.spans.SpanContainingQuery
- All Implemented Interfaces:
Cloneable
Keep matches that contain another SpanScorer.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Creates SpanContainingQuery scorer instances -
Constructor Summary
ConstructorDescriptionSpanContainingQuery
(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) boolean
getBig()
getField()
Returns the name of the field matched by this query.int
hashCode()
rewrite
(IndexReader reader) void
visit
(QueryVisitor visitor) 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
-
createWeight
public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Specified by:
createWeight
in classSpanQuery
- Throws:
IOException
-
getField
Description copied from class:SpanQuery
Returns the name of the field matched by this query. -
getBig
-
getLittle
-
rewrite
- Overrides:
rewrite
in classQuery
- Throws:
IOException
-
visit
-
equals
-
hashCode
public int hashCode()
-