org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequestBuilder Java Examples

The following examples show how to use org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequestBuilder. 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: IndexUpdateSettings.java    From sfs with Apache License 2.0 6 votes vote down vote up
@Override
public Observable<Boolean> call(String index) {
    Elasticsearch elasticsearch = vertxContext.verticle().elasticsearch();
    UpdateSettingsRequestBuilder request = elasticsearch.get().admin().indices().prepareUpdateSettings(index);
    request.setSettings(settings);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(format("Request %s", Jsonify.toString(request)));
    }
    return elasticsearch.execute(vertxContext, request, elasticsearch.getDefaultAdminTimeout())
            .map(Optional::get)
            .doOnNext(updateSettingsResponse -> {
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug(format("Response %s", Jsonify.toString(updateSettingsResponse)));
                }
            })
            .map(AcknowledgedResponse::isAcknowledged);
}
 
Example #2
Source File: PluginClient.java    From openshift-elasticsearch-plugin with Apache License 2.0 5 votes vote down vote up
public UpdateSettingsResponse updateSettings(final String index, Settings settings) {
    return execute(new Callable<UpdateSettingsResponse>() {

        @Override
        public UpdateSettingsResponse call() throws Exception {
            UpdateSettingsRequestBuilder builder = client.admin().indices().prepareUpdateSettings(index)
                    .setSettings(settings);
            return builder.get();
        }
    });
}
 
Example #3
Source File: AbstractClient.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public UpdateSettingsRequestBuilder prepareUpdateSettings(String... indices) {
    return new UpdateSettingsRequestBuilder(this, UpdateSettingsAction.INSTANCE).setIndices(indices);
}
 
Example #4
Source File: AbstractClient.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public UpdateSettingsRequestBuilder prepareUpdateSettings(String... indices) {
    return new UpdateSettingsRequestBuilder(this, UpdateSettingsAction.INSTANCE).setIndices(indices);
}
 
Example #5
Source File: IndicesAdminClient.java    From Elasticsearch with Apache License 2.0 2 votes vote down vote up
/**
 * Update indices settings.
 */
UpdateSettingsRequestBuilder prepareUpdateSettings(String... indices);
 
Example #6
Source File: IndicesAdminClient.java    From crate with Apache License 2.0 2 votes vote down vote up
/**
 * Update indices settings.
 */
UpdateSettingsRequestBuilder prepareUpdateSettings(String... indices);