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
-
public final class SpanOrQuery extends SpanQuery
Matches the union of its clauses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SpanOrQuery.SpanOrWeight
Creates SpanOrQuery scorer instances
-
Constructor Summary
Constructors Constructor Description SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanWeight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
boolean
equals(Object other)
SpanQuery[]
getClauses()
Return the clauses whose spans are matched.String
getField()
Returns the name of the field matched by this query.int
hashCode()
Query
rewrite(IndexReader reader)
String
toString(String field)
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 Detail
-
SpanOrQuery
public SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses. All clauses must have the same field.
-
-
Method Detail
-
getClauses
public SpanQuery[] getClauses()
Return the clauses whose spans are matched.
-
getField
public String getField()
Description copied from class:SpanQuery
Returns the name of the field matched by this query.
-
rewrite
public Query rewrite(IndexReader reader) throws IOException
- Overrides:
rewrite
in classQuery
- Throws:
IOException
-
visit
public void visit(QueryVisitor visitor)
-
createWeight
public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
- Specified by:
createWeight
in classSpanQuery
- Throws:
IOException
-
-