java.lang.Object | |||
↳ | org.apache.lucene.search.Query | ||
↳ | org.apache.lucene.search.spans.SpanQuery | ||
↳ | org.apache.lucene.search.spans.SpanNearQuery |
Known Direct Subclasses |
Matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
clauses | |||||||||||
field | |||||||||||
inOrder | |||||||||||
slop |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a SpanNearQuery.
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a clone of this query.
| |||||||||||
Returns true iff
o is equal to this. | |||||||||||
Expert: adds all terms occurring in this query to the terms set.
| |||||||||||
Return the clauses whose spans are matched.
| |||||||||||
Returns the name of the field matched by this query.
| |||||||||||
Return the maximum number of intervening unmatched positions permitted.
| |||||||||||
Expert: Returns the matches for this query in an index.
| |||||||||||
Return true if matches are required to be in-order.
| |||||||||||
Expert: called to re-write queries into primitive queries.
| |||||||||||
Prints a query to a string, with
field assumed to be the
default field and omitted. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.spans.SpanQuery
| |||||||||||
From class
org.apache.lucene.search.Query
| |||||||||||
From class
java.lang.Object
|
Construct a SpanNearQuery. Matches spans matching a span from each
clause, with up to slop
total unmatched positions between
them. * When inOrder
is true, the spans from each clause
must be * ordered as in clauses
.
clauses | the clauses to find near each other |
---|---|
slop | The slop value |
inOrder | true if order is important |
Expert: adds all terms occurring in this query to the terms set. Only
works if this query is in its rewritten
form.
Return the maximum number of intervening unmatched positions permitted.
Expert: Returns the matches for this query in an index. Used internally to search for spans.
IOException |
---|
Return true if matches are required to be in-order.
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
IOException |
---|
Prints a query to a string, with field
assumed to be the
default field and omitted.
The representation used is one that is supposed to be readable
by QueryParser
. However,
there are the following limitations: