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

Text_similarity_reranker retriever rework to be evaluated during rewrite phase #114085

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pmpailis
Copy link
Contributor

@pmpailis pmpailis commented Oct 3, 2024

Now that #112648 has been merged, in this PR we handle the text_similarity_reranker retriever next, so that it can be evaluated during the rewrite phase and be transformed to a flattened RankDocsRetrieverBuilder. This will enable us to support composition and many search features, including highlighting, aggregations, and collapsing.

@pmpailis
Copy link
Contributor Author

pmpailis commented Oct 4, 2024

@elasticmachine update branch

@@ -32,7 +38,7 @@
/**
* A {@code RetrieverBuilder} for parsing and constructing a text similarity reranker retriever.
*/
public class TextSimilarityRankRetrieverBuilder extends RetrieverBuilder {
public class TextSimilarityRankRetrieverBuilder extends CompoundRetrieverBuilder<TextSimilarityRankRetrieverBuilder> {

public static final NodeFeature TEXT_SIMILARITY_RERANKER_RETRIEVER_SUPPORTED = new NodeFeature(
"text_similarity_reranker_retriever_supported"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we introduce a new cluster feature as we did with rrf ?

@@ -87,11 +87,9 @@ setup:
- length: { hits.hits: 2 }

- match: { hits.hits.0._id: "doc_2" }
- match: { hits.hits.0._rank: 1 }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

_rank has now been removed as with rrf.

@pmpailis pmpailis marked this pull request as ready for review October 4, 2024 08:36
@pmpailis pmpailis requested a review from a team as a code owner October 4, 2024 08:36
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 4, 2024
@elasticsearchmachine
Copy link
Collaborator

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

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 Relevance Meta label for the Search Relevance team in Elasticsearch v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants