org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequestBuilder Java Examples

The following examples show how to use org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequestBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ElasticsearchClusterRunner.java    From elasticsearch-cluster-runner with Apache License 2.0 5 votes vote down vote up
public ForceMergeResponse forceMerge(final BuilderCallback<ForceMergeRequestBuilder> builder) {
    waitForRelocation();
    final ForceMergeResponse actionGet = builder.apply(client().admin().indices().prepareForceMerge()).execute().actionGet();
    final ShardOperationFailedException[] shardFailures = actionGet.getShardFailures();
    if (shardFailures != null && shardFailures.length != 0) {
        final StringBuilder buf = new StringBuilder(100);
        for (final ShardOperationFailedException shardFailure : shardFailures) {
            buf.append(shardFailure.toString()).append('\n');
        }
        onFailure(buf.toString(), actionGet);
    }
    return actionGet;
}
 
Example #2
Source File: ElasticClient.java    From Stargraph with MIT License 4 votes vote down vote up
public ForceMergeRequestBuilder prepareForceMerge() {
    return client.admin().indices().prepareForceMerge(getIndexName()).setFlush(true);
}
 
Example #3
Source File: AbstractClient.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public ForceMergeRequestBuilder prepareForceMerge(String... indices) {
    return new ForceMergeRequestBuilder(this, ForceMergeAction.INSTANCE).setIndices(indices);
}
 
Example #4
Source File: AbstractClient.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public ForceMergeRequestBuilder prepareForceMerge(String... indices) {
    return new ForceMergeRequestBuilder(this, ForceMergeAction.INSTANCE).setIndices(indices);
}
 
Example #5
Source File: IndicesAdminClient.java    From Elasticsearch with Apache License 2.0 2 votes vote down vote up
/**
 * Explicitly force mergee one or more indices into a the number of segments.
 */
ForceMergeRequestBuilder prepareForceMerge(String... indices);
 
Example #6
Source File: IndicesAdminClient.java    From crate with Apache License 2.0 2 votes vote down vote up
/**
 * Explicitly force merge one or more indices into a the number of segments.
 */
ForceMergeRequestBuilder prepareForceMerge(String... indices);