Skip to content

Ensure cross_fields always uses valid term statistics (#90278)#90316

Merged
jtibshirani merged 1 commit intoelastic:7.17from
jtibshirani:cross-fields-7
Sep 23, 2022
Merged

Ensure cross_fields always uses valid term statistics (#90278)#90316
jtibshirani merged 1 commit intoelastic:7.17from
jtibshirani:cross-fields-7

Conversation

@jtibshirani
Copy link
Copy Markdown
Contributor

In #89016 we adjusted the cross_fields scoring formula to prevent negative
scores. This fix accidentally dropped another important fix that was added in
#41938. Specifically, we need to make sure to take the minimum between the
document frequency (actualDf) and the minimum total term frequency
(minTTF). Otherwise, we can produce invalid term statistics where the total
term frequency is less than the document frequency.

Backport of #90314

In elastic#89016 we adjusted the `cross_fields` scoring formula to prevent negative
scores. This fix accidentally dropped another important fix that was added in
document frequency (`actualDf`) and the minimum total term frequency
(`minTTF`). Otherwise, we can produce invalid term statistics where the total
term frequency is less than the document frequency.

Fixes elastic#90275
@jtibshirani jtibshirani added >non-issue :Search Relevance/Ranking Scoring, rescoring, rank evaluation. v7.17.7 labels Sep 23, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Sep 23, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (Team:Search)

@jtibshirani jtibshirani merged commit 7b3bdbe into elastic:7.17 Sep 23, 2022
@jtibshirani jtibshirani deleted the cross-fields-7 branch September 23, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Meta label for search team v7.17.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants