Skip to content

Commit

Permalink
[Backport 2.x] feat: remove search index tool (#297)
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

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

---------

Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws authored Apr 26, 2024
1 parent eeb0d89 commit 1ef9502
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 522 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
189 changes: 0 additions & 189 deletions src/main/java/org/opensearch/agent/tools/SearchIndexTool.java

This file was deleted.

Loading

0 comments on commit 1ef9502

Please sign in to comment.