From 8936d5dad82e4d24e0fc4955768d0585608d0899 Mon Sep 17 00:00:00 2001 From: Martin Gaievski Date: Tue, 1 Aug 2023 11:16:13 -0700 Subject: [PATCH] Change access level for util class and it methods Signed-off-by: Martin Gaievski --- .../processor/combination/ScoreCombinationUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/opensearch/neuralsearch/processor/combination/ScoreCombinationUtil.java b/src/main/java/org/opensearch/neuralsearch/processor/combination/ScoreCombinationUtil.java index 9458c6d35..35e097f7f 100644 --- a/src/main/java/org/opensearch/neuralsearch/processor/combination/ScoreCombinationUtil.java +++ b/src/main/java/org/opensearch/neuralsearch/processor/combination/ScoreCombinationUtil.java @@ -16,7 +16,7 @@ /** * Collection of utility methods for score combination technique classes */ -public class ScoreCombinationUtil { +class ScoreCombinationUtil { private static final String PARAM_NAME_WEIGHTS = "weights"; /** @@ -24,7 +24,7 @@ public class ScoreCombinationUtil { * @param params map of named parameters and their values * @return collection of weights */ - protected List getWeights(final Map params) { + public List getWeights(final Map params) { if (Objects.isNull(params) || params.isEmpty()) { return List.of(); } @@ -39,7 +39,7 @@ protected List getWeights(final Map params) { * @param actualParams map of parameters in form of name-value * @param supportedParams collection of parameters that we should validate against, typically that's what is supported by exact technique */ - protected void validateParams(final Map actualParams, final Set supportedParams) { + public void validateParams(final Map actualParams, final Set supportedParams) { if (Objects.isNull(actualParams) || actualParams.isEmpty()) { return; } @@ -74,7 +74,7 @@ protected void validateParams(final Map actualParams, final Set< * @param indexOfSubQuery 0-based index of sub-query in the Hybrid Search query * @return weight for sub-query, use one that is set in processor/pipeline definition or 1.0 as default */ - protected float getWeightForSubQuery(final List weights, final int indexOfSubQuery) { + public float getWeightForSubQuery(final List weights, final int indexOfSubQuery) { return indexOfSubQuery < weights.size() ? weights.get(indexOfSubQuery) : 1.0f; } }