use of org.elasticsearch.action.admin.indices.open.OpenIndexRequestBuilder in project xp by enonic.
the class IndexServiceInternalImpl method openIndices.
@Override
public void openIndices(final String... indices) {
for (final String indexName : indices) {
OpenIndexRequestBuilder openIndexRequestBuilder = new OpenIndexRequestBuilder(this.client.admin().indices(), OpenIndexAction.INSTANCE).setIndices(indexName);
try {
this.client.admin().indices().open(openIndexRequestBuilder.request()).actionGet();
LOG.info("Opened index " + indexName);
} catch (ElasticsearchException e) {
LOG.error("Could not open index [" + indexName + "]", e);
throw new IndexException("Cannot open index [" + indexName + "]", e);
}
}
}
Aggregations