diff --git a/opensearch-search-quality-evaluation-plugin/scripts/get-query-set-run-results.sh b/opensearch-search-quality-evaluation-plugin/scripts/get-query-set-run-results.sh deleted file mode 100755 index a739828..0000000 --- a/opensearch-search-quality-evaluation-plugin/scripts/get-query-set-run-results.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -e - -curl -s "http://localhost:9200/search_quality_eval_query_sets_run_results/_search" | jq diff --git a/opensearch-search-quality-evaluation-plugin/scripts/run-query-set.sh b/opensearch-search-quality-evaluation-plugin/scripts/run-query-set.sh index b14a138..fc5ef63 100755 --- a/opensearch-search-quality-evaluation-plugin/scripts/run-query-set.sh +++ b/opensearch-search-quality-evaluation-plugin/scripts/run-query-set.sh @@ -7,7 +7,7 @@ ID_FIELD="asin" K="20" THRESHOLD="1.0" # Default value -curl -s -X DELETE "http://localhost:9200/search_quality_eval_query_sets_run_results,sqe_metrics_sample_data" +curl -s -X DELETE "http://localhost:9200/sqe_metrics_sample_data" # Keyword search curl -s -X POST "http://localhost:9200/_plugins/search_quality_eval/run?id=${QUERY_SET_ID}&judgments_id=${JUDGMENTS_ID}&index=${INDEX}&id_field=${ID_FIELD}&k=${K}" \ diff --git a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/SearchQualityEvaluationPlugin.java b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/SearchQualityEvaluationPlugin.java index 45c7ba1..6a7b581 100644 --- a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/SearchQualityEvaluationPlugin.java +++ b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/SearchQualityEvaluationPlugin.java @@ -76,11 +76,6 @@ public class SearchQualityEvaluationPlugin extends Plugin implements ActionPlugi */ public static final String QUERY_SETS_INDEX_NAME = "search_quality_eval_query_sets"; - /** - * The name of the index that stores the query set run results. - */ - public static final String QUERY_SETS_RUN_RESULTS_INDEX_NAME = "search_quality_eval_query_sets_run_results"; - /** * The name of the index that stores the metrics for the dashboard. */ diff --git a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/runners/OpenSearchQuerySetRunner.java b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/runners/OpenSearchQuerySetRunner.java index 7eec08f..05bbf2c 100644 --- a/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/runners/OpenSearchQuerySetRunner.java +++ b/opensearch-search-quality-evaluation-plugin/src/main/java/org/opensearch/eval/runners/OpenSearchQuerySetRunner.java @@ -12,13 +12,11 @@ import org.apache.logging.log4j.Logger; import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.create.CreateIndexResponse; -import org.opensearch.action.admin.indices.exists.indices.IndicesExistsAction; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequest; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.bulk.BulkResponse; import org.opensearch.action.index.IndexRequest; -import org.opensearch.action.index.IndexResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; @@ -40,7 +38,6 @@ import java.util.Map; import java.util.UUID; -import static org.opensearch.eval.SearchQualityEvaluationPlugin.JUDGMENTS_INDEX_NAME; import static org.opensearch.eval.SearchQualityEvaluationRestHandler.QUERY_PLACEHOLDER; /** @@ -186,35 +183,6 @@ public void onFailure(Exception ex) { @Override public void save(final QuerySetRunResult result) throws Exception { - // Index the query results into OpenSearch. - - final Map results = new HashMap<>(); - - results.put("run_id", result.getRunId()); - results.put("query_results", result.getQueryResultsAsMap()); - - // Add each metric to the object to index. - for (final String metric : result.getSearchMetrics().keySet()) { - results.put(metric, result.getSearchMetrics().get(metric)); - } - - final IndexRequest indexRequest = new IndexRequest(SearchQualityEvaluationPlugin.QUERY_SETS_RUN_RESULTS_INDEX_NAME) - .id(UUID.randomUUID().toString()) - .source(results); - - client.index(indexRequest).get(); -// client.index(indexRequest, new ActionListener<>() { -// @Override -// public void onResponse(IndexResponse indexResponse) { -// LOGGER.debug("Query set results indexed."); -// } -// -// @Override -// public void onFailure(Exception ex) { -// throw new RuntimeException(ex); -// } -// }); - // Now, index the metrics as expected by the dashboards. // See https://github.com/o19s/opensearch-search-quality-evaluation/blob/main/opensearch-dashboard-prototyping/METRICS_SCHEMA.md