public class SpanNearQuery extends SpanQuery
Modifier and Type | Field and Description |
---|---|
private List |
clauses |
private String |
field |
private boolean |
inOrder |
private int |
slop |
Constructor and Description |
---|
SpanNearQuery(SpanQuery[] clauses,
int slop,
boolean inOrder)
Construct a SpanNearQuery.
|
Modifier and Type | Method and Description |
---|---|
SpanQuery[] |
getClauses()
Return the clauses whose spans are matched.
|
String |
getField()
Returns the name of the field matched by this query.
|
int |
getSlop()
Return the maximum number of intervening unmatched positions permitted.
|
Spans |
getSpans(IndexReader reader,
Searcher searcher)
Expert: Returns the matches for this query in an index.
|
Query[] |
getSubQueries() |
Collection |
getTerms()
Returns a collection of all terms matched by this query.
|
boolean |
isInOrder()
Return true if matches are required to be in-order.
|
Query |
rewrite(IndexReader reader) |
void |
setSlop(int slop)
Set the maximum edit distance permitted.
|
String |
toString(String field) |
createWeight, getSpanRecording, setSpanRecording
private List clauses
private int slop
private boolean inOrder
private String field
public SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
slop
total edit distance between them.
When inOrder
is true, the spans from each clause
must be ordered as in clauses
.public SpanQuery[] getClauses()
public int getSlop()
public boolean isInOrder()
public void setSlop(int slop)
public String getField()
SpanQuery
public Collection getTerms()
SpanQuery
public Query[] getSubQueries()
public Query rewrite(IndexReader reader) throws IOException
rewrite
in class Query
IOException
public String toString(String field)
toString
in class Query