diff --git a/build.gradle b/build.gradle index 675c5d812..483e8f187 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ validateNebulaPom.enabled = false buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "2.9.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.10.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") isSnapshot = "true" == System.getProperty("build.snapshot", "true") version_tokens = opensearch_version.tokenize('-') diff --git a/release-notes/opensearch-neural-search.release-notes-2.9.0.0.md b/release-notes/opensearch-neural-search.release-notes-2.9.0.0.md new file mode 100644 index 000000000..63f70dd75 --- /dev/null +++ b/release-notes/opensearch-neural-search.release-notes-2.9.0.0.md @@ -0,0 +1,9 @@ +## Version 2.9.0.0 Release Notes + +Compatible with OpenSearch 2.9.0 + +### Maintenance +Increment version to 2.9.0-SNAPSHOT ([#191](https://github.com/opensearch-project/neural-search/pull/191)) + +### Bug Fixes +Fix update document with knnn_vector size not matching issue ([#208](https://github.com/opensearch-project/neural-search/pull/208)) diff --git a/src/main/java/org/opensearch/neuralsearch/plugin/NeuralSearch.java b/src/main/java/org/opensearch/neuralsearch/plugin/NeuralSearch.java index 35467f34c..b656234f0 100644 --- a/src/main/java/org/opensearch/neuralsearch/plugin/NeuralSearch.java +++ b/src/main/java/org/opensearch/neuralsearch/plugin/NeuralSearch.java @@ -18,8 +18,8 @@ import org.opensearch.client.Client; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.util.FeatureFlags; +import org.opensearch.core.common.io.stream.NamedWriteableRegistry; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.env.Environment; import org.opensearch.env.NodeEnvironment; diff --git a/src/main/java/org/opensearch/neuralsearch/query/HybridQueryBuilder.java b/src/main/java/org/opensearch/neuralsearch/query/HybridQueryBuilder.java index e97c20dec..19540550d 100644 --- a/src/main/java/org/opensearch/neuralsearch/query/HybridQueryBuilder.java +++ b/src/main/java/org/opensearch/neuralsearch/query/HybridQueryBuilder.java @@ -21,11 +21,11 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.lucene.search.Query; -import org.opensearch.common.ParsingException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.lucene.search.Queries; import org.opensearch.core.ParseField; +import org.opensearch.core.common.ParsingException; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.index.query.AbstractQueryBuilder; diff --git a/src/main/java/org/opensearch/neuralsearch/query/NeuralQueryBuilder.java b/src/main/java/org/opensearch/neuralsearch/query/NeuralQueryBuilder.java index 50a246348..a7548dbe5 100644 --- a/src/main/java/org/opensearch/neuralsearch/query/NeuralQueryBuilder.java +++ b/src/main/java/org/opensearch/neuralsearch/query/NeuralQueryBuilder.java @@ -23,11 +23,11 @@ import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.lucene.search.Query; import org.opensearch.action.ActionListener; -import org.opensearch.common.ParsingException; import org.opensearch.common.SetOnce; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.core.ParseField; +import org.opensearch.core.common.ParsingException; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.index.mapper.NumberFieldMapper; diff --git a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java index 2a09982d4..2f7379eeb 100644 --- a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java +++ b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java @@ -29,8 +29,8 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.ThreadContext; -import org.opensearch.common.xcontent.XContentType; import org.opensearch.core.xcontent.DeprecationHandler; +import org.opensearch.core.xcontent.MediaType; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.test.rest.OpenSearchRestTestCase; @@ -131,7 +131,7 @@ protected boolean preserveIndicesUponCompletion() { @After public void deleteExternalIndices() throws IOException { final Response response = client().performRequest(new Request("GET", "/_cat/indices?format=json" + "&expand_wildcards=all")); - final XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType().getValue()); + final MediaType xContentType = MediaType.fromMediaType(response.getEntity().getContentType().getValue()); try ( final XContentParser parser = xContentType.xContent() .createParser( diff --git a/src/test/java/org/opensearch/neuralsearch/TestUtils.java b/src/test/java/org/opensearch/neuralsearch/TestUtils.java index 44cc9ae09..ff221bf20 100644 --- a/src/test/java/org/opensearch/neuralsearch/TestUtils.java +++ b/src/test/java/org/opensearch/neuralsearch/TestUtils.java @@ -19,8 +19,8 @@ import java.util.stream.IntStream; import org.apache.commons.lang3.Range; -import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.search.query.QuerySearchResult; diff --git a/src/test/java/org/opensearch/neuralsearch/ValidateDependentPluginInstallationIT.java b/src/test/java/org/opensearch/neuralsearch/ValidateDependentPluginInstallationIT.java index 84707e868..b277f9a8f 100644 --- a/src/test/java/org/opensearch/neuralsearch/ValidateDependentPluginInstallationIT.java +++ b/src/test/java/org/opensearch/neuralsearch/ValidateDependentPluginInstallationIT.java @@ -15,7 +15,6 @@ import org.junit.Assert; import org.opensearch.client.Request; import org.opensearch.client.Response; -import org.opensearch.common.Strings; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.rest.RestRequest; @@ -62,21 +61,20 @@ public void testValidateMLPluginSetup() throws IOException { } private void createBasicKnnIndex() throws IOException { - String mapping = Strings.toString( - XContentFactory.jsonBuilder() - .startObject() - .startObject("properties") - .startObject(KNN_VECTOR_FIELD_NAME) - .field("type", "knn_vector") - .field("dimension", Integer.toString(3)) - .startObject("method") - .field("engine", "lucene") - .field("name", "hnsw") - .endObject() - .endObject() - .endObject() - .endObject() - ); + String mapping = XContentFactory.jsonBuilder() + .startObject() + .startObject("properties") + .startObject(KNN_VECTOR_FIELD_NAME) + .field("type", "knn_vector") + .field("dimension", Integer.toString(3)) + .startObject("method") + .field("engine", "lucene") + .field("name", "hnsw") + .endObject() + .endObject() + .endObject() + .endObject() + .toString(); mapping = mapping.substring(1, mapping.length() - 1); createIndex(KNN_INDEX_NAME, Settings.EMPTY, mapping); } @@ -99,16 +97,15 @@ private Set getAllInstalledPlugins() throws IOException { } private void indexDocument() throws IOException { - final String indexRequestBody = Strings.toString( - XContentFactory.jsonBuilder() - .startObject() - .startArray(KNN_VECTOR_FIELD_NAME) - .value(1.0) - .value(2.0) - .value(4.0) - .endArray() - .endObject() - ); + final String indexRequestBody = XContentFactory.jsonBuilder() + .startObject() + .startArray(KNN_VECTOR_FIELD_NAME) + .value(1.0) + .value(2.0) + .value(4.0) + .endArray() + .endObject() + .toString(); final Request indexRequest = new Request(RestRequest.Method.POST.name(), KNN_DOCUMENT_URL); indexRequest.setJsonEntity(indexRequestBody); assertOK(client().performRequest(indexRequest)); diff --git a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java index 649e8da81..7827f0445 100644 --- a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java +++ b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java @@ -41,16 +41,15 @@ import org.opensearch.client.Response; import org.opensearch.client.RestClient; import org.opensearch.client.WarningsHandler; -import org.opensearch.common.Strings; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.knn.index.SpaceType; import org.opensearch.neuralsearch.OpenSearchSecureRestTestCase; -import org.opensearch.rest.RestStatus; import com.google.common.collect.ImmutableList; @@ -95,7 +94,7 @@ protected void updateClusterSettings(String settingKey, Object value) { "PUT", "_cluster/settings", null, - toHttpEntity(Strings.toString(builder)), + toHttpEntity(builder.toString()), ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "")) ); @@ -115,7 +114,7 @@ protected String uploadModel(String requestBody) throws Exception { ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map uploadResJson = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(uploadResponse.getEntity()), false ); @@ -144,7 +143,7 @@ protected void loadModel(String modelId) throws IOException, InterruptedExceptio ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map uploadResJson = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(uploadResponse.getEntity()), false ); @@ -193,7 +192,7 @@ protected float[] runInference(String modelId, String queryText) { ); Map inferenceResJson = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(inferenceResponse.getEntity()), false ); @@ -223,7 +222,7 @@ protected void createIndexWithConfiguration(String indexName, String indexConfig ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map node = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(response.getEntity()), false ); @@ -247,7 +246,7 @@ protected void createPipelineProcessor(String modelId, String pipelineName) thro ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map node = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(pipelineCreateResponse.getEntity()), false ); @@ -330,14 +329,14 @@ protected Map search( if (requestParams != null && !requestParams.isEmpty()) { requestParams.forEach(request::addParameter); } - request.setJsonEntity(Strings.toString(builder)); + request.setJsonEntity(builder.toString()); Response response = client().performRequest(request); assertEquals(request.getEndpoint() + ": failed", RestStatus.OK, RestStatus.fromCode(response.getStatusLine().getStatusCode())); String responseBody = EntityUtils.toString(response.getEntity()); - return XContentHelper.convertToMap(XContentFactory.xContent(XContentType.JSON), responseBody, false); + return XContentHelper.convertToMap(XContentType.JSON.xContent(), responseBody, false); } /** @@ -382,7 +381,7 @@ protected void addKnnDoc( } builder.endObject(); - request.setJsonEntity(Strings.toString(builder)); + request.setJsonEntity(builder.toString()); Response response = client().performRequest(request); assertEquals(request.getEndpoint() + ": failed", RestStatus.CREATED, RestStatus.fromCode(response.getStatusLine().getStatusCode())); } @@ -453,15 +452,11 @@ protected Map getTaskQueryResponse(String taskId) throws IOExcep toHttpEntity(""), ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); - return XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), - EntityUtils.toString(taskQueryResponse.getEntity()), - false - ); + return XContentHelper.convertToMap(XContentType.JSON.xContent(), EntityUtils.toString(taskQueryResponse.getEntity()), false); } protected boolean checkComplete(Map node) { - Predicate> predicate = x -> node.get("error") != null || "COMPLETED".equals(String.valueOf(node.get("state"))); + Predicate> predicate = x -> "COMPLETED".equals(String.valueOf(node.get("state"))); return predicate.test(node); } @@ -487,7 +482,7 @@ private String buildIndexConfiguration(List knnFieldConfigs, int .endObject() .endObject(); } - return Strings.toString(xContentBuilder.endObject().endObject().endObject()); + return xContentBuilder.endObject().endObject().endObject().toString(); } protected static Response makeRequest( @@ -554,7 +549,7 @@ private String registerModelGroup() throws IOException, URISyntaxException { ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map modelGroupResJson = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(modelGroupResponse.getEntity()), false ); @@ -583,7 +578,7 @@ protected void deleteModel(String modelId) { toHttpEntity(""), ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, DEFAULT_USER_AGENT)) ); - + Thread.sleep(DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND); makeRequest( client(), "DELETE", diff --git a/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorTests.java b/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorTests.java index 596f7c5ab..397642007 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorTests.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorTests.java @@ -28,13 +28,13 @@ import org.opensearch.action.search.SearchPhaseName; import org.opensearch.action.search.SearchProgressListener; import org.opensearch.action.search.SearchRequest; -import org.opensearch.common.breaker.CircuitBreaker; -import org.opensearch.common.breaker.NoopCircuitBreaker; import org.opensearch.common.lucene.search.TopDocsAndMaxScore; import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.concurrent.OpenSearchExecutors; import org.opensearch.common.util.concurrent.OpenSearchThreadPoolExecutor; -import org.opensearch.index.shard.ShardId; +import org.opensearch.core.common.breaker.CircuitBreaker; +import org.opensearch.core.common.breaker.NoopCircuitBreaker; +import org.opensearch.core.index.shard.ShardId; import org.opensearch.neuralsearch.TestUtils; import org.opensearch.neuralsearch.processor.combination.ArithmeticMeanScoreCombinationTechnique; import org.opensearch.neuralsearch.processor.combination.ScoreCombinationFactory; diff --git a/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorWorkflowTests.java b/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorWorkflowTests.java index d041096a1..453725a0d 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorWorkflowTests.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/NormalizationProcessorWorkflowTests.java @@ -15,7 +15,7 @@ import org.apache.lucene.search.TotalHits; import org.opensearch.action.OriginalIndices; import org.opensearch.common.lucene.search.TopDocsAndMaxScore; -import org.opensearch.index.shard.ShardId; +import org.opensearch.core.index.shard.ShardId; import org.opensearch.neuralsearch.TestUtils; import org.opensearch.neuralsearch.processor.combination.ScoreCombinationFactory; import org.opensearch.neuralsearch.processor.combination.ScoreCombiner; diff --git a/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java b/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java index 2aa60873f..b306a7c90 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java @@ -16,7 +16,6 @@ import org.apache.http.util.EntityUtils; import org.junit.After; import org.opensearch.client.Response; -import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; import org.opensearch.neuralsearch.common.BaseNeuralSearchIT; @@ -85,7 +84,7 @@ private void ingestDocument() throws Exception { ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana")) ); Map map = XContentHelper.convertToMap( - XContentFactory.xContent(XContentType.JSON), + XContentType.JSON.xContent(), EntityUtils.toString(response.getEntity()), false ); diff --git a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryBuilderTests.java b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryBuilderTests.java index b8f253c84..49d1ba974 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryBuilderTests.java +++ b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryBuilderTests.java @@ -28,19 +28,19 @@ import org.apache.lucene.search.MatchNoDocsQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermQuery; -import org.opensearch.common.ParsingException; -import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.FilterStreamInput; -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; -import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.core.ParseField; +import org.opensearch.core.common.ParsingException; +import org.opensearch.core.common.bytes.BytesReference; +import org.opensearch.core.common.io.stream.FilterStreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableRegistry; +import org.opensearch.core.index.Index; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; -import org.opensearch.index.Index; import org.opensearch.index.mapper.TextFieldMapper; import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.index.query.QueryBuilder; diff --git a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryTests.java b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryTests.java index 21287ccb7..4d24c2049 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryTests.java +++ b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryTests.java @@ -34,7 +34,7 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.tests.analysis.MockAnalyzer; import org.apache.lucene.tests.search.QueryUtils; -import org.opensearch.index.Index; +import org.opensearch.core.index.Index; import org.opensearch.index.mapper.TextFieldMapper; import org.opensearch.index.query.BoolQueryBuilder; import org.opensearch.index.query.QueryBuilders; diff --git a/src/test/java/org/opensearch/neuralsearch/query/NeuralQueryBuilderTests.java b/src/test/java/org/opensearch/neuralsearch/query/NeuralQueryBuilderTests.java index 7f48e61f9..dda4713b9 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/NeuralQueryBuilderTests.java +++ b/src/test/java/org/opensearch/neuralsearch/query/NeuralQueryBuilderTests.java @@ -31,14 +31,14 @@ import org.opensearch.action.ActionListener; import org.opensearch.client.Client; -import org.opensearch.common.ParsingException; -import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.FilterStreamInput; -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; -import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.core.ParseField; +import org.opensearch.core.common.ParsingException; +import org.opensearch.core.common.bytes.BytesReference; +import org.opensearch.core.common.io.stream.FilterStreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableRegistry; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/test/java/org/opensearch/neuralsearch/query/OpenSearchQueryTestCase.java b/src/test/java/org/opensearch/neuralsearch/query/OpenSearchQueryTestCase.java index 597164915..c45c4adce 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/OpenSearchQueryTestCase.java +++ b/src/test/java/org/opensearch/neuralsearch/query/OpenSearchQueryTestCase.java @@ -30,10 +30,10 @@ import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.common.CheckedConsumer; import org.opensearch.common.SuppressForbidden; -import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.compress.CompressedXContent; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.index.IndexSettings; import org.opensearch.index.analysis.AnalyzerScope; diff --git a/src/test/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcherTests.java b/src/test/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcherTests.java index 14e2064d6..8c078ec88 100644 --- a/src/test/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcherTests.java +++ b/src/test/java/org/opensearch/neuralsearch/search/query/HybridQueryPhaseSearcherTests.java @@ -36,7 +36,8 @@ import org.apache.lucene.tests.analysis.MockAnalyzer; import org.opensearch.action.OriginalIndices; import org.opensearch.common.lucene.search.TopDocsAndMaxScore; -import org.opensearch.index.Index; +import org.opensearch.core.index.Index; +import org.opensearch.core.index.shard.ShardId; import org.opensearch.index.mapper.TextFieldMapper; import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.index.query.QueryBuilder; @@ -44,7 +45,6 @@ import org.opensearch.index.query.QueryShardContext; import org.opensearch.index.query.TermQueryBuilder; import org.opensearch.index.shard.IndexShard; -import org.opensearch.index.shard.ShardId; import org.opensearch.knn.index.mapper.KNNVectorFieldMapper; import org.opensearch.neuralsearch.query.HybridQueryBuilder; import org.opensearch.neuralsearch.query.OpenSearchQueryTestCase;