SpanMultiTermQueryWrapper

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:

{@code
WildcardQuery wildcard = new WildcardQuery(new Term("field", "bro?n"));
SpanQuery spanWildcard = new SpanMultiTermQueryWrapper(wildcard);
// do something with spanWildcard, such as use it in a SpanFirstQuery
}

Constructors

Link copied to clipboard
constructor(query: Q)

Types

Link copied to clipboard
object Companion

A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Link copied to clipboard

Abstract class that defines how the query is rewritten.

Link copied to clipboard

A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Functions

Link copied to clipboard
open override fun createWeight(searcher: IndexSearcher, scoreMode: ScoreMode, boost: Float): SpanWeight
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getField(): String

Returns the name of the field matched by this query.

Link copied to clipboard

Expert: returns the rewriteMethod

Link copied to clipboard

Returns the wrapped query

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun rewrite(indexSearcher: IndexSearcher): Query
Link copied to clipboard

Expert: sets the rewrite method. This only makes sense to be a span rewrite method.

Link copied to clipboard
open override fun toString(field: String?): String
open override fun toString(): String
Link copied to clipboard
open override fun visit(visitor: QueryVisitor)