Search in sources :

Example 6 with ExplainRequest

use of org.opensearch.action.explain.ExplainRequest in project OpenSearch by opensearch-project.

the class SearchIT method testExplainWithAliasFilter.

public void testExplainWithAliasFilter() throws IOException {
    ExplainRequest explainRequest = new ExplainRequest("alias4", "1");
    explainRequest.query(QueryBuilders.matchAllQuery());
    ExplainResponse explainResponse = execute(explainRequest, highLevelClient()::explain, highLevelClient()::explainAsync);
    assertTrue(explainResponse.isExists());
    assertFalse(explainResponse.isMatch());
}
Also used : ExplainResponse(org.opensearch.action.explain.ExplainResponse) ExplainRequest(org.opensearch.action.explain.ExplainRequest)

Aggregations

ExplainRequest (org.opensearch.action.explain.ExplainRequest)6 IOException (java.io.IOException)2 DocWriteRequest (org.opensearch.action.DocWriteRequest)2 DeleteStoredScriptRequest (org.opensearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest)2 GetStoredScriptRequest (org.opensearch.action.admin.cluster.storedscripts.GetStoredScriptRequest)2 PutStoredScriptRequest (org.opensearch.action.admin.cluster.storedscripts.PutStoredScriptRequest)2 BulkRequest (org.opensearch.action.bulk.BulkRequest)2 DeleteRequest (org.opensearch.action.delete.DeleteRequest)2 ExplainResponse (org.opensearch.action.explain.ExplainResponse)2 FieldCapabilitiesRequest (org.opensearch.action.fieldcaps.FieldCapabilitiesRequest)2 GetRequest (org.opensearch.action.get.GetRequest)2 MultiGetRequest (org.opensearch.action.get.MultiGetRequest)2 IndexRequest (org.opensearch.action.index.IndexRequest)2 ClearScrollRequest (org.opensearch.action.search.ClearScrollRequest)2 MultiSearchRequest (org.opensearch.action.search.MultiSearchRequest)2 SearchRequest (org.opensearch.action.search.SearchRequest)2 SearchScrollRequest (org.opensearch.action.search.SearchScrollRequest)2 WriteRequest (org.opensearch.action.support.WriteRequest)2 UpdateRequest (org.opensearch.action.update.UpdateRequest)2 CountRequest (org.opensearch.client.core.CountRequest)2