|
20 | 20 | import com.o19s.es.ltr.action.ListStoresAction.ListStoresActionResponse;
|
21 | 21 | import com.o19s.es.ltr.feature.store.index.IndexFeatureStore;
|
22 | 22 | import org.elasticsearch.action.ActionListener;
|
| 23 | +import org.elasticsearch.core.TimeValue; |
23 | 24 | import org.elasticsearch.action.admin.cluster.state.ClusterStateRequest;
|
24 | 25 | import org.elasticsearch.action.search.MultiSearchRequestBuilder;
|
25 | 26 | import org.elasticsearch.action.search.MultiSearchResponse;
|
|
35 | 36 | import org.elasticsearch.common.util.concurrent.EsExecutors;
|
36 | 37 | import org.elasticsearch.core.Tuple;
|
37 | 38 | import org.elasticsearch.tasks.Task;
|
38 |
| -import org.elasticsearch.common.inject.Inject; |
| 39 | +import org.elasticsearch.injection.guice.Inject; |
39 | 40 | import org.elasticsearch.index.query.QueryBuilders;
|
40 | 41 | import org.elasticsearch.search.aggregations.AggregationBuilders;
|
41 | 42 | import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
|
@@ -73,7 +74,10 @@ public TransportListStoresAction(TransportService transportService,
|
73 | 74 | protected void masterOperation(Task task, ListStoresActionRequest request, ClusterState state,
|
74 | 75 | ActionListener<ListStoresActionResponse> listener) throws Exception {
|
75 | 76 | String[] names = indexNameExpressionResolver.concreteIndexNames(state,
|
76 |
| - new ClusterStateRequest().indices(IndexFeatureStore.DEFAULT_STORE, IndexFeatureStore.STORE_PREFIX + "*")); |
| 77 | + new ClusterStateRequest( |
| 78 | + TimeValue.timeValueMinutes(1)).indices( |
| 79 | + IndexFeatureStore.DEFAULT_STORE, IndexFeatureStore.STORE_PREFIX + "*") |
| 80 | + ); |
77 | 81 | final MultiSearchRequestBuilder req = client.prepareMultiSearch();
|
78 | 82 | final List<Tuple<String, Integer>> versions = new ArrayList<>();
|
79 | 83 | Stream.of(names)
|
|
0 commit comments