|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectQuery
SpanQuery
SpanNearQuery
public class SpanNearQuery
Matches spans which are near one another. One can specify slop, the maximum edit distance, as well as whether matches are required to be in-order. In-order matches are scored higher than out-of-order.
Field Summary | |
---|---|
private List |
clauses
|
private String |
field
|
private boolean |
inOrder
|
private int |
slop
|
Constructor Summary | |
---|---|
SpanNearQuery(SpanQuery[] clauses,
int slop,
boolean inOrder)
Construct a SpanNearQuery. |
Method Summary | |
---|---|
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)
|
Methods inherited from class SpanQuery |
---|
createWeight, getSpanRecording, setSpanRecording |
Methods inherited from class Query |
---|
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private List clauses
private int slop
private boolean inOrder
private String field
Constructor Detail |
---|
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
.
Method Detail |
---|
public SpanQuery[] getClauses()
public int getSlop()
public boolean isInOrder()
public void setSlop(int slop)
public String getField()
SpanQuery
getField
in class SpanQuery
public Collection getTerms()
SpanQuery
getTerms
in class 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
public Spans getSpans(IndexReader reader, Searcher searcher) throws IOException
SpanQuery
getSpans
in class SpanQuery
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |