This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void run(ElasticSearchClient client) throws EnvironmentException { | |
TimeValue scrollValidityTime = timeValueSeconds(30); | |
searchRequest.scroll(scrollValidityTime).searchType(SearchType.SCAN); | |
SearchResponse searchResponse = client.search(searchRequest).actionGet(); | |
long totalSize = searchResponse.getHits().getTotalHits(); | |
long processedHits = searchResponse.getHits().hits().length; | |
indexQueryResultHandler.handle(searchResponse); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package buckeroo.indexing; | |
import org.elasticsearch.action.ActionFuture; | |
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; | |
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; | |
import org.elasticsearch.action.search.SearchRequest; | |
import org.elasticsearch.action.search.SearchResponse; | |
import org.elasticsearch.client.AdminClient; | |
import org.elasticsearch.client.Client; | |
import org.elasticsearch.client.action.delete.DeleteRequestBuilder; |