From 0fc3dd86507d9b310b81f5d6de24e69462739e1f Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Mon, 21 Oct 2024 10:59:13 +1300 Subject: [PATCH] Fix compile errors Signed-off-by: Thomas Farr --- .../client/opensearch/model/VariantsTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java index f647ae56f0..bcf4d1081c 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/VariantsTest.java @@ -221,7 +221,7 @@ public void testNeuralQuery() { assertEquals("passage_embedding", searchRequest.query().neural().field()); assertEquals("Hi world", searchRequest.query().neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().neural().modelId()); - assertEquals(100, searchRequest.query().neural().k()); + assertEquals((Integer) 100, searchRequest.query().neural().k()); } @Test @@ -251,7 +251,7 @@ public void testNeuralQueryFromJson() { searchRequest.query().neural().queryImage() ); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().neural().modelId()); - assertEquals(100, searchRequest.query().neural().k()); + assertEquals((Integer) 100, searchRequest.query().neural().k()); } @Test @@ -279,10 +279,10 @@ public void testHybridQuery() { assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(1).neural().field()); assertEquals("Hi world", searchRequest.query().hybrid().queries().get(1).neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().hybrid().queries().get(1).neural().modelId()); - assertEquals(100, searchRequest.query().hybrid().queries().get(1).neural().k()); + assertEquals((Integer) 100, searchRequest.query().hybrid().queries().get(1).neural().k()); assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(2).knn().field()); assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().vector().length); - assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().k()); + assertEquals((Integer) 2, searchRequest.query().hybrid().queries().get(2).knn().k()); } @Test @@ -301,9 +301,9 @@ public void testHybridQueryFromJson() { assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(1).neural().field()); assertEquals("Hi world", searchRequest.query().hybrid().queries().get(1).neural().queryText()); assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().hybrid().queries().get(1).neural().modelId()); - assertEquals(100, searchRequest.query().hybrid().queries().get(1).neural().k()); + assertEquals((Integer) 100, searchRequest.query().hybrid().queries().get(1).neural().k()); assertEquals("passage_embedding", searchRequest.query().hybrid().queries().get(2).knn().field()); assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().vector().length); - assertEquals(2, searchRequest.query().hybrid().queries().get(2).knn().k()); + assertEquals((Integer) 2, searchRequest.query().hybrid().queries().get(2).knn().k()); } }