From 70679416175c58c43637360a78eb0014faa48b3b Mon Sep 17 00:00:00 2001 From: zane-neo Date: Thu, 23 Jan 2025 16:19:53 +0800 Subject: [PATCH] Fix test failure after lucene upgrade to 10 Signed-off-by: zane-neo --- .../org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java index bea1122eee..3ce1e43432 100644 --- a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java +++ b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java @@ -163,7 +163,7 @@ public void redeployAModel() { private void triggerAutoDeployModels(List addedNodes) { ActionListener listener = ActionListener.wrap(res -> { - if (res != null && res.getHits() != null && res.getHits().getTotalHits() != null && res.getHits().getTotalHits().value > 0) { + if (res != null && res.getHits() != null && res.getHits().getTotalHits() != null && res.getHits().getTotalHits().value() > 0) { Arrays .stream(res.getHits().getHits()) .filter(