Skip to content

Wildcard field should use constant_score and reject wildcard query rewrite param #69604

@markharwood

Description

@markharwood

The wildcard field doesn't use a regular index that is useful for relevance ranking and should always return a Constant_score wrapper around any queries that produce non-constant scores.

As was noted in this discuss post, the rewrite parameter should also be rejected or ignored if anything other than constant_score.
Rejecting may be a little harsh if querying across indices that have a mix of keyword and wildcard field so ignoring the rewrite param on wildcard fields may be more appropriate. The docs should reflect whatever we decide is best (wildcard query or wildcard field docs? Or both?)

Metadata

Metadata

Assignees

Labels

:Search Relevance/RankingScoring, rescoring, rank evaluation.>bug>docsGeneral docs changesTeam:DocsMeta label for docs teamTeam:Search RelevanceMeta label for the Search Relevance team in Elasticsearch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions