protected void refreshIndexIfNeeded(BulkCommand command) { Boolean refresh = command.getParam(REFRESH_INDEX_PARAM); if (Boolean.TRUE.equals(refresh)) { log.warn("Refresh index requested by command: " + command.getId()); ElasticSearchAdmin esa = Framework.getService(ElasticSearchAdmin.class); esa.refreshRepositoryIndex(command.getRepository()); } }
esa.refreshRepositoryIndex(repo.getRepositoryName()); if (waitForAuditStoredInEs) { esa.getClient().refresh(esa.getIndexNameForType(ElasticSearchConstants.ENTRY_TYPE));