org.apache.lucene.queryParser.surround.query
Class DistanceQuery
java.lang.Object
org.apache.lucene.queryParser.surround.query.SrndQuery
org.apache.lucene.queryParser.surround.query.ComposedQuery
org.apache.lucene.queryParser.surround.query.DistanceQuery
- All Implemented Interfaces:
- java.lang.Cloneable, DistanceSubQuery
public class DistanceQuery
- extends ComposedQuery
- implements DistanceSubQuery
Constructor Summary |
DistanceQuery(java.util.List queries,
boolean infix,
int opDistance,
java.lang.String opName,
boolean ordered)
|
Methods inherited from class org.apache.lucene.queryParser.surround.query.ComposedQuery |
getBracketClose, getBracketOpen, getNrSubQueries, getOperatorName, getPrefixSeparator, getSubQueriesIterator, getSubQuery, infixToString, isFieldsSubQueryAcceptable, isOperatorInfix, makeLuceneSubQueriesField, prefixToString, recompose, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DistanceQuery
public DistanceQuery(java.util.List queries,
boolean infix,
int opDistance,
java.lang.String opName,
boolean ordered)
getOpDistance
public int getOpDistance()
subQueriesOrdered
public boolean subQueriesOrdered()
distanceSubQueryNotAllowed
public java.lang.String distanceSubQueryNotAllowed()
- Description copied from interface:
DistanceSubQuery
- When 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:
distanceSubQueryNotAllowed
in interface DistanceSubQuery
addSpanQueries
public void addSpanQueries(SpanNearClauseFactory sncf)
throws java.io.IOException
- Specified by:
addSpanQueries
in interface DistanceSubQuery
- Throws:
java.io.IOException
makeLuceneQueryFieldNoBoost
public org.apache.lucene.search.Query makeLuceneQueryFieldNoBoost(java.lang.String fieldName,
BasicQueryFactory qf)
- Specified by:
makeLuceneQueryFieldNoBoost
in class SrndQuery
getSpanNearQuery
public org.apache.lucene.search.Query getSpanNearQuery(org.apache.lucene.index.IndexReader reader,
java.lang.String fieldName,
float boost,
BasicQueryFactory qf)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.