use of org.sonar.server.es.BulkIndexer.Size in project sonarqube by SonarSource.
the class PermissionIndexer method index.
private void index(Collection<PermissionIndexerDao.Dto> authorizations, AuthorizationScope scope, Size bulkSize) {
IndexType indexType = scope.getIndexType();
BulkIndexer bulkIndexer = new BulkIndexer(esClient, indexType.getIndex());
bulkIndexer.setSize(bulkSize);
bulkIndexer.start();
authorizations.stream().filter(scope.getProjectPredicate()).map(dto -> newIndexRequest(dto, indexType)).forEach(bulkIndexer::add);
bulkIndexer.stop();
}
Aggregations