Skip to content

Commit

Permalink
Refactor project package structure (#55)
Browse files Browse the repository at this point in the history
Brings query up one level from plugin to neuralsearch.

Signed-off-by: John Mazanec <[email protected]>
  • Loading branch information
jmazanec15 authored Nov 3, 2022
1 parent 868e29e commit 99e648b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import org.opensearch.ingest.Processor;
import org.opensearch.ml.client.MachineLearningNodeClient;
import org.opensearch.neuralsearch.ml.MLCommonsClientAccessor;
import org.opensearch.neuralsearch.plugin.query.NeuralQueryBuilder;
import org.opensearch.neuralsearch.processor.TextEmbeddingProcessor;
import org.opensearch.neuralsearch.processor.factory.TextEmbeddingProcessorFactory;
import org.opensearch.neuralsearch.query.NeuralQueryBuilder;
import org.opensearch.neuralsearch.transport.MLPredictAction;
import org.opensearch.neuralsearch.transport.MLPredictTransportAction;
import org.opensearch.plugins.ActionPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin.query;
package org.opensearch.neuralsearch.query;

import static org.opensearch.neuralsearch.common.VectorUtil.vectorAsListToArray;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin;
package org.opensearch.neuralsearch;

import java.io.IOException;

import org.apache.http.util.EntityUtils;
import org.junit.Assert;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.neuralsearch.OpenSearchSecureRestTestCase;
import org.opensearch.rest.RestRequest;

public class NeuralSearchIT extends OpenSearchSecureRestTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin;
package org.opensearch.neuralsearch;

import org.opensearch.knn.common.KNNConstants;
import org.opensearch.knn.index.util.KNNEngine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin;
package org.opensearch.neuralsearch;

import static org.opensearch.test.OpenSearchTestCase.randomFloat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin;
package org.opensearch.neuralsearch;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -18,7 +18,6 @@
import org.opensearch.common.Strings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.neuralsearch.OpenSearchSecureRestTestCase;
import org.opensearch.rest.RestRequest;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin.query;
package org.opensearch.neuralsearch.query;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.opensearch.index.query.AbstractQueryBuilder.BOOST_FIELD;
import static org.opensearch.index.query.AbstractQueryBuilder.NAME_FIELD;
import static org.opensearch.neuralsearch.plugin.TestUtils.xContentBuilderToMap;
import static org.opensearch.neuralsearch.plugin.query.NeuralQueryBuilder.K_FIELD;
import static org.opensearch.neuralsearch.plugin.query.NeuralQueryBuilder.MODEL_ID_FIELD;
import static org.opensearch.neuralsearch.plugin.query.NeuralQueryBuilder.NAME;
import static org.opensearch.neuralsearch.plugin.query.NeuralQueryBuilder.QUERY_TEXT_FIELD;
import static org.opensearch.neuralsearch.TestUtils.xContentBuilderToMap;
import static org.opensearch.neuralsearch.query.NeuralQueryBuilder.K_FIELD;
import static org.opensearch.neuralsearch.query.NeuralQueryBuilder.MODEL_ID_FIELD;
import static org.opensearch.neuralsearch.query.NeuralQueryBuilder.NAME;
import static org.opensearch.neuralsearch.query.NeuralQueryBuilder.QUERY_TEXT_FIELD;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.neuralsearch.plugin.query;
package org.opensearch.neuralsearch.query;

import static org.opensearch.neuralsearch.plugin.TestUtils.createRandomVector;
import static org.opensearch.neuralsearch.plugin.TestUtils.objectToFloat;
import static org.opensearch.neuralsearch.TestUtils.createRandomVector;
import static org.opensearch.neuralsearch.TestUtils.objectToFloat;

import java.io.IOException;
import java.util.Collections;
Expand Down

0 comments on commit 99e648b

Please sign in to comment.