public class SpanTermQuery extends SpanQuery
Modifier and Type | Field and Description |
---|---|
private Term |
term |
private int |
termLength |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
createWeight, getSpanRecording, setSpanRecording
public SpanTermQuery(Term term)
public SpanTermQuery(Term term, int termLength)
public Term getTerm()
public int getTermLength()
public String getField()
SpanQuery
public Collection getTerms()
SpanQuery
public String toString(String field)
toString
in class Query