Skip to content

Conversation

@ioanatia
Copy link
Contributor

Adds an AbstractRetrieverBuilderTests that copies some of the methods in LinearRetrieverBuilderTests.
We then extend this abstract class in both LinearRetrieverBuilderTests and RRFRetrieverBuilderTests removing duplication and making sure we have consistent testing for both retrievers.

This is a prerequisite for adding support for querying multiple indices with the RRF simplified retriever.
And I think it will also help with testing in #132680

@ioanatia ioanatia added >test Issues or PRs that are addressing/adding tests :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team v9.2.0 labels Sep 16, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Mikep86 Mikep86 left a comment

Choose a reason for hiding this comment

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

Nice work! I left a few comments on some small testing gaps and potential improvements.

Copy link
Contributor

@Mikep86 Mikep86 left a comment

Choose a reason for hiding this comment

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

LGTM! I left one one non-blocking comment, do with it what you will.

Comment on lines 153 to 154
T rewrittenLinear = (T) rewritten;
assertEquals(retriever.rankWindowSize(), rewrittenLinear.rankWindowSize());
Copy link
Contributor

Choose a reason for hiding this comment

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

Two nits here:

  • rewrittenLinear is leftover from when this was only for the linear retriever
  • We don't need to check rankWindowSize here anymore, that's done in assertCompoundRetriever

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks - just addressed this too

@ioanatia ioanatia merged commit 9a3892f into elastic:main Sep 16, 2025
34 checks passed
@ioanatia ioanatia deleted the refactor_simplified_retriever_tests branch September 16, 2025 15:21
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
phananh1010 added a commit to phananh1010/elasticsearch that referenced this pull request Sep 23, 2025
BASE=5ce0c649d6b0ebe7c731eb23157489e8d3c46633
HEAD=8c7939c511b854052233c03dc866f469270829d3
Branch=main
phananh1010 added a commit to phananh1010/elasticsearch that referenced this pull request Oct 1, 2025
BASE=5ce0c649d6b0ebe7c731eb23157489e8d3c46633
HEAD=8c7939c511b854052233c03dc866f469270829d3
Branch=main
phananh1010 added a commit to phananh1010/elasticsearch that referenced this pull request Oct 7, 2025
BASE=5ce0c649d6b0ebe7c731eb23157489e8d3c46633
HEAD=8c7939c511b854052233c03dc866f469270829d3
Branch=main
phananh1010 added a commit to phananh1010/elasticsearch that referenced this pull request Oct 17, 2025
BASE=5ce0c649d6b0ebe7c731eb23157489e8d3c46633
HEAD=8c7939c511b854052233c03dc866f469270829d3
Branch=main
phananh1010 added a commit to phananh1010/elasticsearch that referenced this pull request Oct 23, 2025
BASE=5ce0c649d6b0ebe7c731eb23157489e8d3c46633
HEAD=8c7939c511b854052233c03dc866f469270829d3
Branch=main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants