|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Query
org.apache.lucene.search.spans.SpanQuery
public abstract class SpanQuery
Base class for span-based queries.
Constructor Summary | |
---|---|
SpanQuery()
|
Method Summary | |
---|---|
protected Weight |
createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query. |
abstract String |
getField()
Returns the name of the field matched by this query. |
PayloadSpans |
getPayloadSpans(IndexReader reader)
Returns the matches for this query in an index, including access to any Payload s at those
positions. |
abstract Spans |
getSpans(IndexReader reader)
Expert: Returns the matches for this query in an index. |
abstract Collection |
getTerms()
Deprecated. use extractTerms instead |
Methods inherited from class org.apache.lucene.search.Query |
---|
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SpanQuery()
Method Detail |
---|
public abstract Spans getSpans(IndexReader reader) throws IOException
IOException
public PayloadSpans getPayloadSpans(IndexReader reader) throws IOException
Payload
s at those
positions. Implementing classes that want access to the payloads will need to implement this.
reader
- The IndexReader
to use to get spans/payloads
IOException
- if there is an error accessing the payload
WARNING: The status of the Payloads feature is experimental.
The APIs introduced here might change in the future and will not be
supported anymore in such a case.public abstract String getField()
public abstract Collection getTerms()
Query.extractTerms(Set)
protected Weight createWeight(Searcher searcher) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |