Class SimpleTerm
- java.lang.Object
 - 
- org.apache.lucene.queryparser.surround.query.SrndQuery
 - 
- org.apache.lucene.queryparser.surround.query.SimpleTerm
 
 
 
- 
- All Implemented Interfaces:
 java.lang.Cloneable,java.lang.Comparable<SimpleTerm>,DistanceSubQuery
- Direct Known Subclasses:
 SrndPrefixQuery,SrndTermQuery,SrndTruncQuery
public abstract class SimpleTerm extends SrndQuery implements DistanceSubQuery, java.lang.Comparable<SimpleTerm>
Base class for queries that expand to sets of simple terms. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSimpleTerm.MatchingTermVisitorCallback 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 Constructor Description SimpleTerm(boolean q) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddSpanQueries(SpanNearClauseFactory sncf)intcompareTo(SimpleTerm ost)Deprecated.(March 2011) Not normally used, to be removed from Lucene 4.0.java.lang.StringdistanceSubQueryNotAllowed()When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.java.lang.StringgetFieldOperator()java.lang.StringgetQuote()QuerymakeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)java.lang.StringtoString()This method is used bySrndQuery.hashCode()andSrndQuery.equals(Object), see LUCENE-2945.abstract java.lang.StringtoStringUnquoted()abstract voidvisitMatchingTerms(IndexReader reader, java.lang.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 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getQuote
public java.lang.String getQuote()
 
- 
getFieldOperator
public java.lang.String getFieldOperator()
 
- 
toStringUnquoted
public abstract java.lang.String toStringUnquoted()
 
- 
compareTo
@Deprecated public int compareTo(SimpleTerm ost)
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 interfacejava.lang.Comparable<SimpleTerm>
 
- 
toString
public java.lang.String toString()
Description copied from class:SrndQueryThis method is used bySrndQuery.hashCode()andSrndQuery.equals(Object), see LUCENE-2945. 
- 
visitMatchingTerms
public abstract void visitMatchingTerms(IndexReader reader, java.lang.String fieldName, SimpleTerm.MatchingTermVisitor mtv) throws java.io.IOException
- Throws:
 java.io.IOException
 
- 
distanceSubQueryNotAllowed
public java.lang.String 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
public void addSpanQueries(SpanNearClauseFactory sncf) throws java.io.IOException
- Specified by:
 addSpanQueriesin interfaceDistanceSubQuery- Throws:
 java.io.IOException
 
- 
makeLuceneQueryFieldNoBoost
public Query makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
- Specified by:
 makeLuceneQueryFieldNoBoostin classSrndQuery
 
 - 
 
 -