From e0c13cc3beb8994bf57a515298b96c192dc15499 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Wed, 26 Jun 2024 14:09:57 -0400 Subject: [PATCH 1/2] Add documentation for using rerank and normalization processors together Signed-off-by: Fanit Kolchina --- .../reranking-search-results.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/_search-plugins/search-relevance/reranking-search-results.md b/_search-plugins/search-relevance/reranking-search-results.md index 14c418020d..535706d0dd 100644 --- a/_search-plugins/search-relevance/reranking-search-results.md +++ b/_search-plugins/search-relevance/reranking-search-results.md @@ -115,4 +115,19 @@ POST /my-index/_search ``` {% include copy-curl.html %} -Alternatively, you can provide the full path to the field containing the context. For more information, see [Rerank processor example]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/rerank-processor/#example). \ No newline at end of file +Alternatively, you can provide the full path to the field containing the context. For more information, see [Rerank processor example]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/rerank-processor/#example). + +## Using rerank and normalization processors together + +When you use a rerank processor in conjunction with a [normalization processor]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/normalization-processor/) and a hybrid query, the rerank processor alters the final document scores. This is because the rerank processor operates after the normalization processor in the search pipeline. +{: .note} + +The processing order is as follows: + +- Normalization processor: This processor normalizes the document scores based on the configured normalization method. For more information, see [Normalization processor]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/normalization-processor/). +- Rerank processor: Following the normalization, the rerank processor further adjusts the document scores. This adjustment can significantly impact the final ordering of search results. + +This processing order has the following implications: + +- Score modification: The rerank processor modifies the scores that were initially adjusted by the normalization processor, potentially leading to different ranking results than initially expected. +- Hybrid queries: In the context of hybrid queries, where multiple types of queries and scoring mechanisms are combined, this behavior is particularly noteworthy. The combined scores from the initial query are normalized first and then reranked, resulting in a two-stage scoring modification. \ No newline at end of file From fe14b15f425e6d1827acf855103fffd68835f9d4 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:07:55 -0400 Subject: [PATCH 2/2] Update _search-plugins/search-relevance/reranking-search-results.md Co-authored-by: Nathan Bower Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --- _search-plugins/search-relevance/reranking-search-results.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_search-plugins/search-relevance/reranking-search-results.md b/_search-plugins/search-relevance/reranking-search-results.md index 535706d0dd..4b4deaeb92 100644 --- a/_search-plugins/search-relevance/reranking-search-results.md +++ b/_search-plugins/search-relevance/reranking-search-results.md @@ -125,7 +125,7 @@ When you use a rerank processor in conjunction with a [normalization processor]( The processing order is as follows: - Normalization processor: This processor normalizes the document scores based on the configured normalization method. For more information, see [Normalization processor]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/normalization-processor/). -- Rerank processor: Following the normalization, the rerank processor further adjusts the document scores. This adjustment can significantly impact the final ordering of search results. +- Rerank processor: Following normalization, the rerank processor further adjusts the document scores. This adjustment can significantly impact the final ordering of search results. This processing order has the following implications: