Skip to content

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

Merged
anakin87 merged 3 commits into
mainfrom
fix-join-docs-null-score
Nov 9, 2023
Merged

fix: make JoinDocuments correctly handle duplicate documents w null scores#6261
anakin87 merged 3 commits into
mainfrom
fix-join-docs-null-score

Conversation

@anakin87
Copy link
Copy Markdown
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, masci and silvanocerza 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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. 👍

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