public class SpanOrNearQuery extends SpanQuery
Modifier and Type | Field and Description |
---|---|
private SpanQuery[] |
clauses |
private String |
field |
private boolean |
penalizeOutOfOrder |
private int |
slop |
Constructor and Description |
---|
SpanOrNearQuery(SpanQuery[] clauses,
int slop,
boolean penalizeOutOfOrder)
Construct a SpanOrNearQuery.
|
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 |
penalizeOutOfOrder()
Return true if matches are penalized for being out of order.
|
Query |
rewrite(IndexReader reader) |
void |
setSlop(int slop)
Set the maximum edit distance permitted.
|
String |
toString(String field) |
createWeight, getSpanRecording, setSpanRecording
private SpanQuery[] clauses
private int slop
private boolean penalizeOutOfOrder
private String field
public SpanOrNearQuery(SpanQuery[] clauses, int slop, boolean penalizeOutOfOrder)
slop
total edit distance
between them.
When penalizeOutOfOrder
is true, out of order clauses are
scored lower than in-order clauses.public SpanQuery[] getClauses()
public int getSlop()
public boolean penalizeOutOfOrder()
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