Package org.apache.lucene.queries.spans
Class SpanContainQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.queries.spans.SpanQuery
-
- org.apache.lucene.queries.spans.SpanContainQuery
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
SpanContainingQuery
,SpanWithinQuery
abstract class SpanContainQuery extends SpanQuery implements java.lang.Cloneable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SpanContainQuery.SpanContainWeight
-
Constructor Summary
Constructors Constructor Description SpanContainQuery(SpanQuery big, SpanQuery little)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Override and implement query instance equivalence properly in a subclass.private boolean
equalsTo(SpanContainQuery other)
SpanQuery
getBig()
java.lang.String
getField()
Returns the name of the field matched by this query.SpanQuery
getLittle()
int
hashCode()
Override and implement query hash code properly in a subclass.Query
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.(package private) java.lang.String
toString(java.lang.String field, java.lang.String name)
void
visit(QueryVisitor visitor)
Recurse through the query tree, visiting any child queries-
Methods inherited from class org.apache.lucene.queries.spans.SpanQuery
createWeight, getTermStates, getTermStates
-
Methods inherited from class org.apache.lucene.search.Query
classHash, sameClassAs, toString, toString
-
-
-
-
Method Detail
-
getField
public java.lang.String getField()
Description copied from class:SpanQuery
Returns the name of the field matched by this query.
-
getBig
public SpanQuery getBig()
-
getLittle
public SpanQuery getLittle()
-
toString
java.lang.String toString(java.lang.String field, java.lang.String name)
-
rewrite
public Query rewrite(IndexReader reader) throws java.io.IOException
Description copied from class:Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.Callers are expected to call
rewrite
multiple times if necessary, until the rewritten query is the same as the original query.- Overrides:
rewrite
in classQuery
- Throws:
java.io.IOException
- See Also:
IndexSearcher.rewrite(Query)
-
visit
public void visit(QueryVisitor visitor)
Description copied from class:Query
Recurse through the query tree, visiting any child queries
-
equals
public boolean equals(java.lang.Object other)
Description copied from class:Query
Override and implement query instance equivalence properly in a subclass. This is required so thatQueryCache
works properly.Typically a query will be equal to another only if it's an instance of the same class and its document-filtering properties are identical that other instance. Utility methods are provided for certain repetitive code.
- Specified by:
equals
in classQuery
- See Also:
Query.sameClassAs(Object)
,Query.classHash()
-
equalsTo
private boolean equalsTo(SpanContainQuery other)
-
hashCode
public int hashCode()
Description copied from class:Query
Override and implement query hash code properly in a subclass. This is required so thatQueryCache
works properly.- Specified by:
hashCode
in classQuery
- See Also:
Query.equals(Object)
-
-