Search in sources :

Example 16 with RefreshRequest

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.action.admin.indices.refresh.RefreshRequest in project graylog2-server by Graylog2.

the class MessagesES7IT method messageCount.

@Override
protected long messageCount(String indexName) {
    this.elasticsearch.elasticsearchClient().execute((c, requestOptions) -> c.indices().refresh(new RefreshRequest(), requestOptions));
    final CountRequest countRequest = new CountRequest(indexName);
    final CountResponse result = this.elasticsearch.elasticsearchClient().execute((c, requestOptions) -> c.count(countRequest, requestOptions));
    return result.getCount();
}
Also used : RefreshRequest(org.graylog.shaded.elasticsearch7.org.elasticsearch.action.admin.indices.refresh.RefreshRequest) CountRequest(org.graylog.shaded.elasticsearch7.org.elasticsearch.client.core.CountRequest) CountResponse(org.graylog.shaded.elasticsearch7.org.elasticsearch.client.core.CountResponse)

Example 17 with RefreshRequest

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.action.admin.indices.refresh.RefreshRequest in project graylog2-server by Graylog2.

the class ClientES7 method refreshNode.

@Override
public void refreshNode() {
    final RefreshRequest refreshRequest = new RefreshRequest();
    client.execute((c, requestOptions) -> c.indices().refresh(refreshRequest, requestOptions));
}
Also used : RefreshRequest(org.graylog.shaded.elasticsearch7.org.elasticsearch.action.admin.indices.refresh.RefreshRequest)

Aggregations

RefreshRequest (org.elasticsearch.action.admin.indices.refresh.RefreshRequest)15 DeleteIndexRequest (org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)6 XContentBuilder (org.elasticsearch.common.xcontent.XContentBuilder)5 IndexRequest (org.elasticsearch.action.index.IndexRequest)4 RestHighLevelClient (org.elasticsearch.client.RestHighLevelClient)4 CreateIndexRequest (org.elasticsearch.client.indices.CreateIndexRequest)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 RefreshResponse (org.elasticsearch.action.admin.indices.refresh.RefreshResponse)3 Map (java.util.Map)2 FlushRequest (org.elasticsearch.action.admin.indices.flush.FlushRequest)2 SearchResponse (org.elasticsearch.action.search.SearchResponse)2 IndicesOptions (org.elasticsearch.action.support.IndicesOptions)2 EsRejectedExecutionException (org.elasticsearch.common.util.concurrent.EsRejectedExecutionException)2 RefreshRequest (org.graylog.shaded.elasticsearch7.org.elasticsearch.action.admin.indices.refresh.RefreshRequest)2 AnalyzedRefreshTable (io.crate.analyze.AnalyzedRefreshTable)1 PartitionPropertiesAnalyzer.toPartitionName (io.crate.analyze.PartitionPropertiesAnalyzer.toPartitionName)1 SymbolEvaluator (io.crate.analyze.SymbolEvaluator)1 Lists2 (io.crate.common.collections.Lists2)1 InMemoryBatchIterator (io.crate.data.InMemoryBatchIterator)1