|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectQuery
SpanQuery
SpanTermQuery
public class SpanTermQuery
Matches spans containing a term.
| Field Summary | |
|---|---|
private Term |
term
|
private int |
termLength
|
| Constructor Summary | |
|---|---|
SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans. |
|
SpanTermQuery(Term term,
int termLength)
Construct a SpanTermQuery matching the named term's spans, using the specified stop-word set. |
|
| Method Summary | |
|---|---|
String |
getField()
Returns the name of the field matched by this query. |
Spans |
getSpans(IndexReader reader,
Searcher searcher)
Expert: Returns the matches for this query in an index. |
Term |
getTerm()
Return the term whose spans are matched. |
int |
getTermLength()
Return the length of the term in positions (typically 1) |
Collection |
getTerms()
Returns a collection of all terms matched by this query. |
String |
toString(String field)
|
| Methods inherited from class SpanQuery |
|---|
createWeight, getSpanRecording, setSpanRecording |
| Methods inherited from class Query |
|---|
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Term term
private int termLength
| Constructor Detail |
|---|
public SpanTermQuery(Term term)
public SpanTermQuery(Term term,
int termLength)
| Method Detail |
|---|
public Term getTerm()
public int getTermLength()
public String getField()
SpanQuery
getField in class SpanQuerypublic Collection getTerms()
SpanQuery
getTerms in class SpanQuerypublic String toString(String field)
toString in class Query
public Spans getSpans(IndexReader reader,
Searcher searcher)
throws IOException
SpanQuery
getSpans in class SpanQueryIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||