Class SimpleTerm
java.lang.Object
org.apache.lucene.queryparser.surround.query.SrndQuery
org.apache.lucene.queryparser.surround.query.SimpleTerm
- All Implemented Interfaces:
Cloneable,Comparable<SimpleTerm>,DistanceSubQuery
- Direct Known Subclasses:
SrndPrefixQuery,SrndTermQuery,SrndTruncQuery
public abstract class SimpleTerm
extends SrndQuery
implements DistanceSubQuery, Comparable<SimpleTerm>
Base class for queries that expand to sets of simple terms.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback to visit each matching term during "rewrite" inSimpleTerm.MatchingTermVisitor.visitMatchingTerm(Term) -
Field Summary
Fields inherited from class org.apache.lucene.queryparser.surround.query.SrndQuery
theEmptyLcnQuery -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintcompareTo(SimpleTerm ost) Deprecated.(March 2011) Not normally used, to be removed from Lucene 4.0.When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.getQuote()makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf) toString()This method is used bySrndQuery.hashCode()andSrndQuery.equals(Object), see LUCENE-2945.abstract Stringabstract voidvisitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv) Methods inherited from class org.apache.lucene.queryparser.surround.query.SrndQuery
clone, equals, getWeight, getWeightOperator, getWeightString, hashCode, isFieldsSubQueryAcceptable, isWeighted, makeLuceneQueryField, setWeight
-
Constructor Details
-
SimpleTerm
public SimpleTerm(boolean q)
-
-
Method Details
-
getQuote
-
getFieldOperator
-
toStringUnquoted
-
compareTo
Deprecated.(March 2011) Not normally used, to be removed from Lucene 4.0. This class implementing Comparable is to be removed at the same time.- Specified by:
compareToin interfaceComparable<SimpleTerm>
-
toString
Description copied from class:SrndQueryThis method is used bySrndQuery.hashCode()andSrndQuery.equals(Object), see LUCENE-2945. -
visitMatchingTerms
public abstract void visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv) throws IOException - Throws:
IOException
-
distanceSubQueryNotAllowed
Description copied from interface:DistanceSubQueryWhen distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
When distanceSubQueryNotAllowed() returns null addSpanNearQueries() can be used in the creation of the span near clause for the subquery.- Specified by:
distanceSubQueryNotAllowedin interfaceDistanceSubQuery
-
addSpanQueries
- Specified by:
addSpanQueriesin interfaceDistanceSubQuery- Throws:
IOException
-
makeLuceneQueryFieldNoBoost
- Specified by:
makeLuceneQueryFieldNoBoostin classSrndQuery
-