Class BlendedTermQuery

  • public final class BlendedTermQuery
    extends Query
    A Query that blends index statistics across multiple terms. This is particularly useful when several terms should produce identical scores, regardless of their index statistics.

    For instance imagine that you are resolving synonyms at search time, all terms should produce identical scores instead of the default behavior, which tends to give higher scores to rare terms.

    An other useful use-case is cross-field search: imagine that you would like to search for john on two fields: first_name and last_name. You might not want to give a higher weight to matches on the field where john is rarer, in which case BlendedTermQuery would help as well.