Skip to content

Commit

Permalink
feat: remove search index tool (#295)
Browse files Browse the repository at this point in the history
* remove search index tool

Signed-off-by: yuye-aws <[email protected]>

* remove search index tool integration tests

Signed-off-by: yuye-aws <[email protected]>

* make processResponse private

Signed-off-by: yuye-aws <[email protected]>

* remove json file for search index tool it

Signed-off-by: yuye-aws <[email protected]>

* remove json file for search index tool ut

Signed-off-by: yuye-aws <[email protected]>

* Revert "remove json file for search index tool ut"

This reverts commit 1db72bb.

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
(cherry picked from commit 0e65e62)
  • Loading branch information
yuye-aws committed Apr 26, 2024
1 parent eeb0d89 commit 264a5c4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 333 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/opensearch/agent/ToolPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.opensearch.agent.tools.SearchAlertsTool;
import org.opensearch.agent.tools.SearchAnomalyDetectorsTool;
import org.opensearch.agent.tools.SearchAnomalyResultsTool;
import org.opensearch.agent.tools.SearchIndexTool;
import org.opensearch.agent.tools.SearchMonitorsTool;
import org.opensearch.agent.tools.VectorDBTool;
import org.opensearch.agent.tools.VisualizationsTool;
Expand Down Expand Up @@ -66,7 +65,6 @@ public Collection<Object> createComponents(
VisualizationsTool.Factory.getInstance().init(client);
NeuralSparseSearchTool.Factory.getInstance().init(client, xContentRegistry);
VectorDBTool.Factory.getInstance().init(client, xContentRegistry);
SearchIndexTool.Factory.getInstance().init(client, xContentRegistry);
RAGTool.Factory.getInstance().init(client, xContentRegistry);
SearchAlertsTool.Factory.getInstance().init(client);
SearchAnomalyDetectorsTool.Factory.getInstance().init(client, namedWriteableRegistry);
Expand All @@ -83,7 +81,6 @@ public List<Tool.Factory<? extends Tool>> getToolFactories() {
NeuralSparseSearchTool.Factory.getInstance(),
VectorDBTool.Factory.getInstance(),
VisualizationsTool.Factory.getInstance(),
SearchIndexTool.Factory.getInstance(),
RAGTool.Factory.getInstance(),
SearchAlertsTool.Factory.getInstance(),
SearchAnomalyDetectorsTool.Factory.getInstance(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected AbstractRetrieverTool(

protected abstract String getQueryBody(String queryText);

public static Map<String, Object> processResponse(SearchHit hit) {
private static Map<String, Object> processResponse(SearchHit hit) {
Map<String, Object> docContent = new HashMap<>();
docContent.put("_index", hit.getIndex());
docContent.put("_id", hit.getId());
Expand Down
183 changes: 0 additions & 183 deletions src/test/java/org/opensearch/agent/tools/SearchIndexToolTests.java

This file was deleted.

136 changes: 0 additions & 136 deletions src/test/java/org/opensearch/integTest/SearchIndexToolIT.java

This file was deleted.

This file was deleted.

0 comments on commit 264a5c4

Please sign in to comment.