Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make JoinDocuments correctly handle duplicate documents w null scores #6261

Merged
merged 3 commits into from
Nov 9, 2023

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Nov 9, 2023

Related Issues

When using JoinDocuments with join_mode=concatenate (default) and passing duplicate documents, including some with a null score, this node raised an exception.

Proposed Changes:

  • fix this behavior, considering null scores == -inf for ordering purposes

How did you test it?

New unit test, CI

Checklist

@anakin87 anakin87 requested review from a team as code owners November 9, 2023 12:30
@anakin87 anakin87 requested review from dfokina, silvanocerza and masci and removed request for a team November 9, 2023 12:30
* concatenate: combine the documents from multiple nodes. Any duplicate documents are discarded.
The score is only determined by the last node that outputs the document.
* concatenate: combine the documents from multiple nodes.
In case of duplicate documents, the one with the highest score is kept.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a breaking change.
I'm just documenting a behavior that was already introduced in #5970 (maybe that was a breaking change).

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 6811802313

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 40.328%

Totals Coverage Status
Change from base Build 6811076012: 0.004%
Covered Lines: 10499
Relevant Lines: 26034

💛 - Coveralls

Copy link
Contributor

@silvanocerza silvanocerza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. 👍

@anakin87 anakin87 merged commit 2b3c77e into main Nov 9, 2023
55 checks passed
@anakin87 anakin87 deleted the fix-join-docs-null-score branch November 9, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JoinDocuments now fails if any document is without a score
3 participants