Adding breaking change entry for retrievers (#115399)

This commit is contained in:
Panagiotis Bailis 2024-10-24 16:29:14 +03:00 committed by GitHub
parent 833f2fb918
commit e99607b589
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,29 @@
pr: 115399
summary: Adding breaking change entry for retrievers
area: Search
type: breaking
issues: []
breaking:
title: Reworking RRF retriever to be evaluated during rewrite phase
area: REST API
details: |-
In this release (8.16), we have introduced major changes to the retrievers framework
and how they can be evaluated, focusing mainly on compound retrievers
like `rrf` and `text_similarity_reranker`, which allowed us to support full
composability (i.e. any retriever can be nested under any compound retriever),
as well as supporting additional search features like collapsing, explaining,
aggregations, and highlighting.
To ensure consistency, and given that this rework is not available until 8.16,
`rrf` and `text_similarity_reranker` retriever queries would now
throw an exception in a mixed cluster scenario, where there are nodes
both in current or later (i.e. >= 8.16) and previous ( <= 8.15) versions.
As part of the rework, we have also removed the `_rank` property from
the responses of an `rrf` retriever.
impact: |-
- Users will not be able to use the `rrf` and `text_similarity_reranker` retrievers in a mixed cluster scenario
with previous releases (i.e. prior to 8.16), and the request will throw an `IllegalArgumentException`.
- `_rank` has now been removed from the output of the `rrf` retrievers so trying to directly parse the field
will throw an exception
notable: false

View file

@ -81,7 +81,7 @@ public class TextSimilarityRankRetrieverBuilder extends CompoundRetrieverBuilder
throw new ParsingException(parser.getTokenLocation(), "unknown retriever [" + TextSimilarityRankBuilder.NAME + "]"); throw new ParsingException(parser.getTokenLocation(), "unknown retriever [" + TextSimilarityRankBuilder.NAME + "]");
} }
if (context.clusterSupportsFeature(TEXT_SIMILARITY_RERANKER_COMPOSITION_SUPPORTED) == false) { if (context.clusterSupportsFeature(TEXT_SIMILARITY_RERANKER_COMPOSITION_SUPPORTED) == false) {
throw new UnsupportedOperationException( throw new IllegalArgumentException(
"[text_similarity_reranker] retriever composition feature is not supported by all nodes in the cluster" "[text_similarity_reranker] retriever composition feature is not supported by all nodes in the cluster"
); );
} }

View file

@ -83,7 +83,7 @@ public final class RRFRetrieverBuilder extends CompoundRetrieverBuilder<RRFRetri
throw new ParsingException(parser.getTokenLocation(), "unknown retriever [" + NAME + "]"); throw new ParsingException(parser.getTokenLocation(), "unknown retriever [" + NAME + "]");
} }
if (context.clusterSupportsFeature(RRF_RETRIEVER_COMPOSITION_SUPPORTED) == false) { if (context.clusterSupportsFeature(RRF_RETRIEVER_COMPOSITION_SUPPORTED) == false) {
throw new UnsupportedOperationException("[rrf] retriever composition feature is not supported by all nodes in the cluster"); throw new IllegalArgumentException("[rrf] retriever composition feature is not supported by all nodes in the cluster");
} }
if (RRFRankPlugin.RANK_RRF_FEATURE.check(XPackPlugin.getSharedLicenseState()) == false) { if (RRFRankPlugin.RANK_RRF_FEATURE.check(XPackPlugin.getSharedLicenseState()) == false) {
throw LicenseUtils.newComplianceException("Reciprocal Rank Fusion (RRF)"); throw LicenseUtils.newComplianceException("Reciprocal Rank Fusion (RRF)");