fix index not found on trace query when using es7 (#5911)

* fix index not found on trace query when using es7

* add changelog

Co-authored-by: Evan <evanljp@outlook.com>
This commit is contained in:
Evan 2020-11-27 16:59:21 +08:00 committed by GitHub
parent 2150904f01
commit 94b205f23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,7 @@ Release Notes.
* Fix the incorrect dynamic configuration key bug of `endpoint-name-grouping`.
* Remove unused min date timebucket in jdbc deletehistory logical
* Fix "transaction too large error" when use TiDB as storage.
* Fix "index not found" in trace query when use ES7 storage.
* Add otel rules to ui template to observe Istio control plane.
* Remove istio mixer
* Support close influxdb batch write model.

View File

@ -48,6 +48,7 @@ import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.ActiveShardCount;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.GetAliasesResponse;
@ -195,6 +196,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
@Override
public SearchResponse doSearch(SearchSourceBuilder searchSourceBuilder, String... indexNames) throws IOException {
SearchRequest searchRequest = new SearchRequest(indexNames);
searchRequest.indicesOptions(IndicesOptions.fromOptions(true, true, true, false));
searchRequest.source(searchSourceBuilder);
try {
SearchResponse response = client.search(searchRequest, RequestOptions.DEFAULT);