Package org.apache.lucene.queries.spans
Class SpanOrQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.spans.SpanQuery
org.apache.lucene.queries.spans.SpanOrQuery
Matches the union of its clauses.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Creates SpanOrQuery scorer instances -
Constructor Summary
ConstructorDescriptionSpanOrQuery
(SpanQuery... clauses) Construct a SpanOrQuery merging the provided clauses. -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(IndexSearcher searcher, ScoreMode scoreMode, float boost) boolean
Return the clauses whose spans are matched.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
-
SpanOrQuery
Construct a SpanOrQuery merging the provided clauses. All clauses must have the same field.
-
-
Method Details
-
getClauses
Return the clauses whose spans are matched. -
getField
Description copied from class:SpanQuery
Returns the name of the field matched by this query. -
rewrite
- Overrides:
rewrite
in classQuery
- Throws:
IOException
-
visit
-
toString
-
equals
-
hashCode
public int hashCode() -
createWeight
public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Specified by:
createWeight
in classSpanQuery
- Throws:
IOException
-