From 312c7f729ac03c70bbb7161d06545399125525e2 Mon Sep 17 00:00:00 2001 From: Martin Gaievski Date: Mon, 23 Dec 2024 08:53:43 -0800 Subject: [PATCH] Integrate explainability for hybrid query into RRF processor (#1037) * Integrate explainability for hybrid query into RRF processor Signed-off-by: Martin Gaievski --- .../org/opensearch/neuralsearch/processor/RRFProcessor.java | 2 +- .../java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/opensearch/neuralsearch/processor/RRFProcessor.java b/src/main/java/org/opensearch/neuralsearch/processor/RRFProcessor.java index eaf25e3f1..cf9e3b820 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/RRFProcessor.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/RRFProcessor.java @@ -14,7 +14,6 @@ import com.google.common.annotations.VisibleForTesting; import lombok.Getter; -import org.opensearch.ml.repackage.com.google.common.annotations.VisibleForTesting; import org.opensearch.neuralsearch.processor.combination.ScoreCombinationTechnique; import org.opensearch.neuralsearch.processor.normalization.ScoreNormalizationTechnique; import org.opensearch.search.fetch.FetchSearchResult; @@ -80,6 +79,7 @@ void hybridizeScores( .combinationTechnique(combinationTechnique) .explain(explain) .pipelineProcessingContext(requestContextOptional.orElse(null)) + .searchPhaseContext(searchPhaseContext) .build(); normalizationWorkflow.execute(normalizationExecuteDTO); } diff --git a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java index 95757e463..fb71fe0bb 100644 --- a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java +++ b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java @@ -1580,7 +1580,7 @@ protected void createRRFSearchPipeline(final String pipelineName, boolean addExp if (addExplainResponseProcessor) { builder.startArray("response_processors") .startObject() - .startObject("explanation_response_processor") + .startObject("hybrid_score_explanation") .endObject() .endObject() .endArray();