Companion

object Companion

Properties

Link copied to clipboard

A rewrite method where documents are assigned a constant score equal to the query's boost. Maintains a boolean query-like implementation over the most costly terms while pre-processing the less costly terms into a filter bitset. Enforces an upper-limit on the number of terms allowed in the boolean query-like implementation.

Link copied to clipboard

Like .SCORING_BOOLEAN_REWRITE except scores are not computed. Instead, each matching document receives a constant score equal to the query's boost.

Link copied to clipboard

A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term. Matching documents are assigned a constant score equal to the query's boost.

Link copied to clipboard

A rewrite method that uses org.gnit.lucenekmp.index.DocValuesType.SORTED / doc values to find matching docs through a post-filtering type approach. This will be very slow if used in isolation, but will likely be the most performant option when combined with a sparse query clause. All matching docs are assigned a constant score equal to the query's boost.

Link copied to clipboard

A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query. Note that typically such scores are meaningless to the user, and require non-trivial CPU to compute, so it's almost always better to use .CONSTANT_SCORE_REWRITE instead.