Class SpanMultiTermQueryWrapper<Q>
Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
The query is rewritten by default to a SpanOrQuery containing the expanded terms, but this can be customized.
Example:
WildcardQuery wildcard = new WildcardQuery(new Term("field", "bro?n"));
SpanQuery spanWildcard = new SpanMultiTermQueryWrapper<WildcardQuery>(wildcard);
// do something with spanWildcard, such as use it in a SpanFirstQuery
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public class SpanMultiTermQueryWrapper<Q> : SpanQuery, ISpanMultiTermQueryWrapper where Q : MultiTermQuery
Type Parameters
Name | Description |
---|---|
Q |
Constructors
Name | Description |
---|---|
SpanMultiTermQueryWrapper(Q) | Create a new SpanMultiTermQueryWrapper<Q>. |
Fields
Name | Description |
---|---|
m_query | |
SCORING_SPAN_QUERY_REWRITE | A rewrite method that first translates each term into a SpanTermQuery in a SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query. |
Properties
Name | Description |
---|---|
Field | |
MultiTermRewriteMethod | Expert: Gets or Sets the rewrite method. This only makes sense to be a span rewrite method. |
WrappedQuery | Returns the wrapped query |
Methods
Name | Description |
---|---|
Equals(Object) | |
GetHashCode() | |
GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>) | |
Rewrite(IndexReader) | |
ToString(String) |