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
Inheritance
System.Object
SpanMultiTermQueryWrapper<Q>
Assembly: Lucene.Net.dll
Syntax
public class SpanMultiTermQueryWrapper<Q> : SpanQuery, ISpanMultiTermQueryWrapper where Q : MultiTermQuery
Type Parameters
Constructors
|
Improve this Doc
View Source
SpanMultiTermQueryWrapper(Q)
Declaration
public SpanMultiTermQueryWrapper(Q query)
Parameters
Type |
Name |
Description |
Q |
query |
Query to wrap.
NOTE: This will set MultiTermRewriteMethod
on the wrapped query , changing its rewrite method to a suitable one for spans.
Be sure to not change the rewrite method on the wrapped query afterwards! Doing so will
throw on rewriting this query!
|
Fields
|
Improve this Doc
View Source
m_query
Declaration
protected readonly Q m_query
Field Value
|
Improve this Doc
View Source
SCORING_SPAN_QUERY_REWRITE
Declaration
public static readonly SpanRewriteMethod SCORING_SPAN_QUERY_REWRITE
Field Value
See Also
Properties
|
Improve this Doc
View Source
Field
Declaration
public override string Field { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
MultiTermRewriteMethod
Expert: Gets or Sets the rewrite method. This only makes sense
to be a span rewrite method.
Declaration
public SpanRewriteMethod MultiTermRewriteMethod { get; set; }
Property Value
|
Improve this Doc
View Source
WrappedQuery
Returns the wrapped query
Declaration
public virtual Query WrappedQuery { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
Declaration
public override Spans GetSpans(AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
Rewrite(IndexReader)
Declaration
public override Query Rewrite(IndexReader reader)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
ToString(String)
Declaration
public override string ToString(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Type |
Description |
System.String |
|
Overrides
Implements