
co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient Maven / Gradle / Ivy
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.indices;
import co.elastic.clients.ApiClient;
import co.elastic.clients.elasticsearch._types.ElasticsearchException;
import co.elastic.clients.elasticsearch._types.ErrorResponse;
import co.elastic.clients.transport.ElasticsearchTransport;
import co.elastic.clients.transport.Endpoint;
import co.elastic.clients.transport.JsonEndpoint;
import co.elastic.clients.transport.Transport;
import co.elastic.clients.transport.TransportOptions;
import co.elastic.clients.transport.endpoints.BooleanResponse;
import co.elastic.clients.util.ObjectBuilder;
import java.io.IOException;
import java.util.function.Function;
import javax.annotation.Nullable;
/**
* Client for the indices namespace.
*/
public class ElasticsearchIndicesClient extends ApiClient {
public ElasticsearchIndicesClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchIndicesClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchIndicesClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchIndicesClient(this.transport, transportOptions);
}
// ----- Endpoint: indices.add_block
/**
* Adds a block to an index.
*
* @see Documentation
* on elastic.co
*/
public AddBlockResponse addBlock(AddBlockRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) AddBlockRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Adds a block to an index.
*
* @param fn
* a function that initializes a builder to create the
* {@link AddBlockRequest}
* @see Documentation
* on elastic.co
*/
public final AddBlockResponse addBlock(Function> fn)
throws IOException, ElasticsearchException {
return addBlock(fn.apply(new AddBlockRequest.Builder()).build());
}
// ----- Endpoint: indices.analyze
/**
* Performs the analysis process on a text and return the tokens breakdown of
* the text.
*
* @see Documentation
* on elastic.co
*/
public AnalyzeResponse analyze(AnalyzeRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) AnalyzeRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Performs the analysis process on a text and return the tokens breakdown of
* the text.
*
* @param fn
* a function that initializes a builder to create the
* {@link AnalyzeRequest}
* @see Documentation
* on elastic.co
*/
public final AnalyzeResponse analyze(Function> fn)
throws IOException, ElasticsearchException {
return analyze(fn.apply(new AnalyzeRequest.Builder()).build());
}
/**
* Performs the analysis process on a text and return the tokens breakdown of
* the text.
*
* @see Documentation
* on elastic.co
*/
public AnalyzeResponse analyze() throws IOException, ElasticsearchException {
return this.transport.performRequest(new AnalyzeRequest.Builder().build(), AnalyzeRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.clear_cache
/**
* Clears all or specific caches for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public ClearCacheResponse clearCache(ClearCacheRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ClearCacheRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Clears all or specific caches for one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link ClearCacheRequest}
* @see Documentation
* on elastic.co
*/
public final ClearCacheResponse clearCache(Function> fn)
throws IOException, ElasticsearchException {
return clearCache(fn.apply(new ClearCacheRequest.Builder()).build());
}
/**
* Clears all or specific caches for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public ClearCacheResponse clearCache() throws IOException, ElasticsearchException {
return this.transport.performRequest(new ClearCacheRequest.Builder().build(), ClearCacheRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.clone
/**
* Clones an index
*
* @see Documentation
* on elastic.co
*/
public CloneIndexResponse clone(CloneIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) CloneIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Clones an index
*
* @param fn
* a function that initializes a builder to create the
* {@link CloneIndexRequest}
* @see Documentation
* on elastic.co
*/
public final CloneIndexResponse clone(Function> fn)
throws IOException, ElasticsearchException {
return clone(fn.apply(new CloneIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.close
/**
* Closes an index.
*
* @see Documentation
* on elastic.co
*/
public CloseIndexResponse close(CloseIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) CloseIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Closes an index.
*
* @param fn
* a function that initializes a builder to create the
* {@link CloseIndexRequest}
* @see Documentation
* on elastic.co
*/
public final CloseIndexResponse close(Function> fn)
throws IOException, ElasticsearchException {
return close(fn.apply(new CloseIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.create
/**
* Creates an index with optional settings and mappings.
*
* @see Documentation
* on elastic.co
*/
public CreateIndexResponse create(CreateIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) CreateIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Creates an index with optional settings and mappings.
*
* @param fn
* a function that initializes a builder to create the
* {@link CreateIndexRequest}
* @see Documentation
* on elastic.co
*/
public final CreateIndexResponse create(Function> fn)
throws IOException, ElasticsearchException {
return create(fn.apply(new CreateIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.create_data_stream
/**
* Creates a data stream
*
* @see Documentation
* on elastic.co
*/
public CreateDataStreamResponse createDataStream(CreateDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) CreateDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Creates a data stream
*
* @param fn
* a function that initializes a builder to create the
* {@link CreateDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final CreateDataStreamResponse createDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return createDataStream(fn.apply(new CreateDataStreamRequest.Builder()).build());
}
// ----- Endpoint: indices.data_streams_stats
/**
* Provides statistics on operations happening in a data stream.
*
* @see Documentation
* on elastic.co
*/
public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DataStreamsStatsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Provides statistics on operations happening in a data stream.
*
* @param fn
* a function that initializes a builder to create the
* {@link DataStreamsStatsRequest}
* @see Documentation
* on elastic.co
*/
public final DataStreamsStatsResponse dataStreamsStats(
Function> fn)
throws IOException, ElasticsearchException {
return dataStreamsStats(fn.apply(new DataStreamsStatsRequest.Builder()).build());
}
/**
* Provides statistics on operations happening in a data stream.
*
* @see Documentation
* on elastic.co
*/
public DataStreamsStatsResponse dataStreamsStats() throws IOException, ElasticsearchException {
return this.transport.performRequest(new DataStreamsStatsRequest.Builder().build(),
DataStreamsStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: indices.delete
/**
* Deletes an index.
*
* @see Documentation
* on elastic.co
*/
public DeleteIndexResponse delete(DeleteIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Deletes an index.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteIndexRequest}
* @see Documentation
* on elastic.co
*/
public final DeleteIndexResponse delete(Function> fn)
throws IOException, ElasticsearchException {
return delete(fn.apply(new DeleteIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.delete_alias
/**
* Deletes an alias.
*
* @see Documentation
* on elastic.co
*/
public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteAliasRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Deletes an alias.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteAliasRequest}
* @see Documentation
* on elastic.co
*/
public final DeleteAliasResponse deleteAlias(
Function> fn)
throws IOException, ElasticsearchException {
return deleteAlias(fn.apply(new DeleteAliasRequest.Builder()).build());
}
// ----- Endpoint: indices.delete_data_stream
/**
* Deletes a data stream.
*
* @see Documentation
* on elastic.co
*/
public DeleteDataStreamResponse deleteDataStream(DeleteDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Deletes a data stream.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final DeleteDataStreamResponse deleteDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return deleteDataStream(fn.apply(new DeleteDataStreamRequest.Builder()).build());
}
// ----- Endpoint: indices.delete_index_template
/**
* Deletes an index template.
*
* @see Documentation
* on elastic.co
*/
public DeleteIndexTemplateResponse deleteIndexTemplate(DeleteIndexTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteIndexTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Deletes an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteIndexTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final DeleteIndexTemplateResponse deleteIndexTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return deleteIndexTemplate(fn.apply(new DeleteIndexTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.delete_template
/**
* Deletes an index template.
*
* @see Documentation
* on elastic.co
*/
public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Deletes an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final DeleteTemplateResponse deleteTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return deleteTemplate(fn.apply(new DeleteTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.disk_usage
/**
* Analyzes the disk usage of each field of an index or data stream
*
* @see Documentation
* on elastic.co
*/
public DiskUsageResponse diskUsage(DiskUsageRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DiskUsageRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Analyzes the disk usage of each field of an index or data stream
*
* @param fn
* a function that initializes a builder to create the
* {@link DiskUsageRequest}
* @see Documentation
* on elastic.co
*/
public final DiskUsageResponse diskUsage(Function> fn)
throws IOException, ElasticsearchException {
return diskUsage(fn.apply(new DiskUsageRequest.Builder()).build());
}
// ----- Endpoint: indices.downsample
/**
* Downsample an index
*
* @see Documentation
* on elastic.co
*/
public DownsampleResponse downsample(DownsampleRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DownsampleRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Downsample an index
*
* @param fn
* a function that initializes a builder to create the
* {@link DownsampleRequest}
* @see Documentation
* on elastic.co
*/
public final DownsampleResponse downsample(Function> fn)
throws IOException, ElasticsearchException {
return downsample(fn.apply(new DownsampleRequest.Builder()).build());
}
// ----- Endpoint: indices.exists
/**
* Returns information about whether a particular index exists.
*
* @see Documentation
* on elastic.co
*/
public BooleanResponse exists(ExistsRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
Endpoint endpoint = (Endpoint) ExistsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about whether a particular index exists.
*
* @param fn
* a function that initializes a builder to create the
* {@link ExistsRequest}
* @see Documentation
* on elastic.co
*/
public final BooleanResponse exists(Function> fn)
throws IOException, ElasticsearchException {
return exists(fn.apply(new ExistsRequest.Builder()).build());
}
// ----- Endpoint: indices.exists_alias
/**
* Returns information about whether a particular alias exists.
*
* @see Documentation
* on elastic.co
*/
public BooleanResponse existsAlias(ExistsAliasRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
Endpoint endpoint = (Endpoint) ExistsAliasRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about whether a particular alias exists.
*
* @param fn
* a function that initializes a builder to create the
* {@link ExistsAliasRequest}
* @see Documentation
* on elastic.co
*/
public final BooleanResponse existsAlias(Function> fn)
throws IOException, ElasticsearchException {
return existsAlias(fn.apply(new ExistsAliasRequest.Builder()).build());
}
// ----- Endpoint: indices.exists_index_template
/**
* Returns information about whether a particular index template exists.
*
* @see Documentation
* on elastic.co
*/
public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
Endpoint endpoint = (Endpoint) ExistsIndexTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about whether a particular index template exists.
*
* @param fn
* a function that initializes a builder to create the
* {@link ExistsIndexTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final BooleanResponse existsIndexTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return existsIndexTemplate(fn.apply(new ExistsIndexTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.exists_template
/**
* Returns information about whether a particular index template exists.
*
* @see Documentation
* on elastic.co
*/
public BooleanResponse existsTemplate(ExistsTemplateRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
Endpoint endpoint = (Endpoint) ExistsTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about whether a particular index template exists.
*
* @param fn
* a function that initializes a builder to create the
* {@link ExistsTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final BooleanResponse existsTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return existsTemplate(fn.apply(new ExistsTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.field_usage_stats
/**
* Returns the field usage stats for each field of an index
*
* @see Documentation
* on elastic.co
*/
public FieldUsageStatsResponse fieldUsageStats(FieldUsageStatsRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) FieldUsageStatsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns the field usage stats for each field of an index
*
* @param fn
* a function that initializes a builder to create the
* {@link FieldUsageStatsRequest}
* @see Documentation
* on elastic.co
*/
public final FieldUsageStatsResponse fieldUsageStats(
Function> fn)
throws IOException, ElasticsearchException {
return fieldUsageStats(fn.apply(new FieldUsageStatsRequest.Builder()).build());
}
// ----- Endpoint: indices.flush
/**
* Performs the flush operation on one or more indices.
*
* @see Documentation
* on elastic.co
*/
public FlushResponse flush(FlushRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) FlushRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Performs the flush operation on one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link FlushRequest}
* @see Documentation
* on elastic.co
*/
public final FlushResponse flush(Function> fn)
throws IOException, ElasticsearchException {
return flush(fn.apply(new FlushRequest.Builder()).build());
}
/**
* Performs the flush operation on one or more indices.
*
* @see Documentation
* on elastic.co
*/
public FlushResponse flush() throws IOException, ElasticsearchException {
return this.transport.performRequest(new FlushRequest.Builder().build(), FlushRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.forcemerge
/**
* Performs the force merge operation on one or more indices.
*
* @see Documentation
* on elastic.co
*/
public ForcemergeResponse forcemerge(ForcemergeRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ForcemergeRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Performs the force merge operation on one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link ForcemergeRequest}
* @see Documentation
* on elastic.co
*/
public final ForcemergeResponse forcemerge(Function> fn)
throws IOException, ElasticsearchException {
return forcemerge(fn.apply(new ForcemergeRequest.Builder()).build());
}
/**
* Performs the force merge operation on one or more indices.
*
* @see Documentation
* on elastic.co
*/
public ForcemergeResponse forcemerge() throws IOException, ElasticsearchException {
return this.transport.performRequest(new ForcemergeRequest.Builder().build(), ForcemergeRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.get
/**
* Returns information about one or more indices.
*
* @see Documentation
* on elastic.co
*/
public GetIndexResponse get(GetIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetIndexRequest}
* @see Documentation
* on elastic.co
*/
public final GetIndexResponse get(Function> fn)
throws IOException, ElasticsearchException {
return get(fn.apply(new GetIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.get_alias
/**
* Returns an alias.
*
* @see Documentation
* on elastic.co
*/
public GetAliasResponse getAlias(GetAliasRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetAliasRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns an alias.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetAliasRequest}
* @see Documentation
* on elastic.co
*/
public final GetAliasResponse getAlias(Function> fn)
throws IOException, ElasticsearchException {
return getAlias(fn.apply(new GetAliasRequest.Builder()).build());
}
/**
* Returns an alias.
*
* @see Documentation
* on elastic.co
*/
public GetAliasResponse getAlias() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetAliasRequest.Builder().build(), GetAliasRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.get_data_stream
/**
* Returns data streams.
*
* @see Documentation
* on elastic.co
*/
public GetDataStreamResponse getDataStream(GetDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns data streams.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final GetDataStreamResponse getDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return getDataStream(fn.apply(new GetDataStreamRequest.Builder()).build());
}
/**
* Returns data streams.
*
* @see Documentation
* on elastic.co
*/
public GetDataStreamResponse getDataStream() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetDataStreamRequest.Builder().build(), GetDataStreamRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.get_field_mapping
/**
* Returns mapping for one or more fields.
*
* @see Documentation
* on elastic.co
*/
public GetFieldMappingResponse getFieldMapping(GetFieldMappingRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetFieldMappingRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns mapping for one or more fields.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetFieldMappingRequest}
* @see Documentation
* on elastic.co
*/
public final GetFieldMappingResponse getFieldMapping(
Function> fn)
throws IOException, ElasticsearchException {
return getFieldMapping(fn.apply(new GetFieldMappingRequest.Builder()).build());
}
// ----- Endpoint: indices.get_index_template
/**
* Returns an index template.
*
* @see Documentation
* on elastic.co
*/
public GetIndexTemplateResponse getIndexTemplate(GetIndexTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetIndexTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetIndexTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final GetIndexTemplateResponse getIndexTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return getIndexTemplate(fn.apply(new GetIndexTemplateRequest.Builder()).build());
}
/**
* Returns an index template.
*
* @see Documentation
* on elastic.co
*/
public GetIndexTemplateResponse getIndexTemplate() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetIndexTemplateRequest.Builder().build(),
GetIndexTemplateRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: indices.get_mapping
/**
* Returns mappings for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public GetMappingResponse getMapping(GetMappingRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetMappingRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns mappings for one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetMappingRequest}
* @see Documentation
* on elastic.co
*/
public final GetMappingResponse getMapping(Function> fn)
throws IOException, ElasticsearchException {
return getMapping(fn.apply(new GetMappingRequest.Builder()).build());
}
/**
* Returns mappings for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public GetMappingResponse getMapping() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetMappingRequest.Builder().build(), GetMappingRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.get_settings
/**
* Returns settings for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public GetIndicesSettingsResponse getSettings(GetIndicesSettingsRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetIndicesSettingsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns settings for one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetIndicesSettingsRequest}
* @see Documentation
* on elastic.co
*/
public final GetIndicesSettingsResponse getSettings(
Function> fn)
throws IOException, ElasticsearchException {
return getSettings(fn.apply(new GetIndicesSettingsRequest.Builder()).build());
}
/**
* Returns settings for one or more indices.
*
* @see Documentation
* on elastic.co
*/
public GetIndicesSettingsResponse getSettings() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetIndicesSettingsRequest.Builder().build(),
GetIndicesSettingsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: indices.get_template
/**
* Returns an index template.
*
* @see Documentation
* on elastic.co
*/
public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final GetTemplateResponse getTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return getTemplate(fn.apply(new GetTemplateRequest.Builder()).build());
}
/**
* Returns an index template.
*
* @see Documentation
* on elastic.co
*/
public GetTemplateResponse getTemplate() throws IOException, ElasticsearchException {
return this.transport.performRequest(new GetTemplateRequest.Builder().build(), GetTemplateRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.migrate_to_data_stream
/**
* Migrates an alias to a data stream
*
* @see Documentation
* on elastic.co
*/
public MigrateToDataStreamResponse migrateToDataStream(MigrateToDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) MigrateToDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Migrates an alias to a data stream
*
* @param fn
* a function that initializes a builder to create the
* {@link MigrateToDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final MigrateToDataStreamResponse migrateToDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return migrateToDataStream(fn.apply(new MigrateToDataStreamRequest.Builder()).build());
}
// ----- Endpoint: indices.modify_data_stream
/**
* Modifies a data stream
*
* @see Documentation
* on elastic.co
*/
public ModifyDataStreamResponse modifyDataStream(ModifyDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ModifyDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Modifies a data stream
*
* @param fn
* a function that initializes a builder to create the
* {@link ModifyDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final ModifyDataStreamResponse modifyDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return modifyDataStream(fn.apply(new ModifyDataStreamRequest.Builder()).build());
}
// ----- Endpoint: indices.open
/**
* Opens an index.
*
* @see Documentation
* on elastic.co
*/
public OpenResponse open(OpenRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) OpenRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Opens an index.
*
* @param fn
* a function that initializes a builder to create the
* {@link OpenRequest}
* @see Documentation
* on elastic.co
*/
public final OpenResponse open(Function> fn)
throws IOException, ElasticsearchException {
return open(fn.apply(new OpenRequest.Builder()).build());
}
// ----- Endpoint: indices.promote_data_stream
/**
* Promotes a data stream from a replicated data stream managed by CCR to a
* regular data stream
*
* @see Documentation
* on elastic.co
*/
public PromoteDataStreamResponse promoteDataStream(PromoteDataStreamRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PromoteDataStreamRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Promotes a data stream from a replicated data stream managed by CCR to a
* regular data stream
*
* @param fn
* a function that initializes a builder to create the
* {@link PromoteDataStreamRequest}
* @see Documentation
* on elastic.co
*/
public final PromoteDataStreamResponse promoteDataStream(
Function> fn)
throws IOException, ElasticsearchException {
return promoteDataStream(fn.apply(new PromoteDataStreamRequest.Builder()).build());
}
// ----- Endpoint: indices.put_alias
/**
* Creates or updates an alias.
*
* @see Documentation
* on elastic.co
*/
public PutAliasResponse putAlias(PutAliasRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutAliasRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Creates or updates an alias.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutAliasRequest}
* @see Documentation
* on elastic.co
*/
public final PutAliasResponse putAlias(Function> fn)
throws IOException, ElasticsearchException {
return putAlias(fn.apply(new PutAliasRequest.Builder()).build());
}
// ----- Endpoint: indices.put_index_template
/**
* Creates or updates an index template.
*
* @see Documentation
* on elastic.co
*/
public PutIndexTemplateResponse putIndexTemplate(PutIndexTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutIndexTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Creates or updates an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutIndexTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final PutIndexTemplateResponse putIndexTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return putIndexTemplate(fn.apply(new PutIndexTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.put_mapping
/**
* Updates the index mappings.
*
* @see Documentation
* on elastic.co
*/
public PutMappingResponse putMapping(PutMappingRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutMappingRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Updates the index mappings.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutMappingRequest}
* @see Documentation
* on elastic.co
*/
public final PutMappingResponse putMapping(Function> fn)
throws IOException, ElasticsearchException {
return putMapping(fn.apply(new PutMappingRequest.Builder()).build());
}
// ----- Endpoint: indices.put_settings
/**
* Updates the index settings.
*
* @see Documentation
* on elastic.co
*/
public PutIndicesSettingsResponse putSettings(PutIndicesSettingsRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutIndicesSettingsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Updates the index settings.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutIndicesSettingsRequest}
* @see Documentation
* on elastic.co
*/
public final PutIndicesSettingsResponse putSettings(
Function> fn)
throws IOException, ElasticsearchException {
return putSettings(fn.apply(new PutIndicesSettingsRequest.Builder()).build());
}
/**
* Updates the index settings.
*
* @see Documentation
* on elastic.co
*/
public PutIndicesSettingsResponse putSettings() throws IOException, ElasticsearchException {
return this.transport.performRequest(new PutIndicesSettingsRequest.Builder().build(),
PutIndicesSettingsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: indices.put_template
/**
* Creates or updates an index template.
*
* @see Documentation
* on elastic.co
*/
public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Creates or updates an index template.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final PutTemplateResponse putTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return putTemplate(fn.apply(new PutTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.recovery
/**
* Returns information about ongoing index shard recoveries.
*
* @see Documentation
* on elastic.co
*/
public RecoveryResponse recovery(RecoveryRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) RecoveryRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about ongoing index shard recoveries.
*
* @param fn
* a function that initializes a builder to create the
* {@link RecoveryRequest}
* @see Documentation
* on elastic.co
*/
public final RecoveryResponse recovery(Function> fn)
throws IOException, ElasticsearchException {
return recovery(fn.apply(new RecoveryRequest.Builder()).build());
}
/**
* Returns information about ongoing index shard recoveries.
*
* @see Documentation
* on elastic.co
*/
public RecoveryResponse recovery() throws IOException, ElasticsearchException {
return this.transport.performRequest(new RecoveryRequest.Builder().build(), RecoveryRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.refresh
/**
* Performs the refresh operation in one or more indices.
*
* @see Documentation
* on elastic.co
*/
public RefreshResponse refresh(RefreshRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) RefreshRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Performs the refresh operation in one or more indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link RefreshRequest}
* @see Documentation
* on elastic.co
*/
public final RefreshResponse refresh(Function> fn)
throws IOException, ElasticsearchException {
return refresh(fn.apply(new RefreshRequest.Builder()).build());
}
/**
* Performs the refresh operation in one or more indices.
*
* @see Documentation
* on elastic.co
*/
public RefreshResponse refresh() throws IOException, ElasticsearchException {
return this.transport.performRequest(new RefreshRequest.Builder().build(), RefreshRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.reload_search_analyzers
/**
* Reloads an index's search analyzers and their resources.
*
* @see Documentation
* on elastic.co
*/
public ReloadSearchAnalyzersResponse reloadSearchAnalyzers(ReloadSearchAnalyzersRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ReloadSearchAnalyzersRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Reloads an index's search analyzers and their resources.
*
* @param fn
* a function that initializes a builder to create the
* {@link ReloadSearchAnalyzersRequest}
* @see Documentation
* on elastic.co
*/
public final ReloadSearchAnalyzersResponse reloadSearchAnalyzers(
Function> fn)
throws IOException, ElasticsearchException {
return reloadSearchAnalyzers(fn.apply(new ReloadSearchAnalyzersRequest.Builder()).build());
}
// ----- Endpoint: indices.resolve_index
/**
* Returns information about any matching indices, aliases, and data streams
*
* @see Documentation
* on elastic.co
*/
public ResolveIndexResponse resolveIndex(ResolveIndexRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ResolveIndexRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Returns information about any matching indices, aliases, and data streams
*
* @param fn
* a function that initializes a builder to create the
* {@link ResolveIndexRequest}
* @see Documentation
* on elastic.co
*/
public final ResolveIndexResponse resolveIndex(
Function> fn)
throws IOException, ElasticsearchException {
return resolveIndex(fn.apply(new ResolveIndexRequest.Builder()).build());
}
// ----- Endpoint: indices.rollover
/**
* Updates an alias to point to a new index when the existing index is
* considered to be too large or too old.
*
* @see Documentation
* on elastic.co
*/
public RolloverResponse rollover(RolloverRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) RolloverRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Updates an alias to point to a new index when the existing index is
* considered to be too large or too old.
*
* @param fn
* a function that initializes a builder to create the
* {@link RolloverRequest}
* @see Documentation
* on elastic.co
*/
public final RolloverResponse rollover(Function> fn)
throws IOException, ElasticsearchException {
return rollover(fn.apply(new RolloverRequest.Builder()).build());
}
// ----- Endpoint: indices.segments
/**
* Provides low-level information about segments in a Lucene index.
*
* @see Documentation
* on elastic.co
*/
public SegmentsResponse segments(SegmentsRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) SegmentsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Provides low-level information about segments in a Lucene index.
*
* @param fn
* a function that initializes a builder to create the
* {@link SegmentsRequest}
* @see Documentation
* on elastic.co
*/
public final SegmentsResponse segments(Function> fn)
throws IOException, ElasticsearchException {
return segments(fn.apply(new SegmentsRequest.Builder()).build());
}
/**
* Provides low-level information about segments in a Lucene index.
*
* @see Documentation
* on elastic.co
*/
public SegmentsResponse segments() throws IOException, ElasticsearchException {
return this.transport.performRequest(new SegmentsRequest.Builder().build(), SegmentsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.shard_stores
/**
* Provides store information for shard copies of indices.
*
* @see Documentation
* on elastic.co
*/
public ShardStoresResponse shardStores(ShardStoresRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ShardStoresRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Provides store information for shard copies of indices.
*
* @param fn
* a function that initializes a builder to create the
* {@link ShardStoresRequest}
* @see Documentation
* on elastic.co
*/
public final ShardStoresResponse shardStores(
Function> fn)
throws IOException, ElasticsearchException {
return shardStores(fn.apply(new ShardStoresRequest.Builder()).build());
}
/**
* Provides store information for shard copies of indices.
*
* @see Documentation
* on elastic.co
*/
public ShardStoresResponse shardStores() throws IOException, ElasticsearchException {
return this.transport.performRequest(new ShardStoresRequest.Builder().build(), ShardStoresRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.shrink
/**
* Allow to shrink an existing index into a new index with fewer primary shards.
*
* @see Documentation
* on elastic.co
*/
public ShrinkResponse shrink(ShrinkRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ShrinkRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Allow to shrink an existing index into a new index with fewer primary shards.
*
* @param fn
* a function that initializes a builder to create the
* {@link ShrinkRequest}
* @see Documentation
* on elastic.co
*/
public final ShrinkResponse shrink(Function> fn)
throws IOException, ElasticsearchException {
return shrink(fn.apply(new ShrinkRequest.Builder()).build());
}
// ----- Endpoint: indices.simulate_index_template
/**
* Simulate matching the given index name against the index templates in the
* system
*
* @see Documentation
* on elastic.co
*/
public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) SimulateIndexTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Simulate matching the given index name against the index templates in the
* system
*
* @param fn
* a function that initializes a builder to create the
* {@link SimulateIndexTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final SimulateIndexTemplateResponse simulateIndexTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return simulateIndexTemplate(fn.apply(new SimulateIndexTemplateRequest.Builder()).build());
}
// ----- Endpoint: indices.simulate_template
/**
* Simulate resolving the given template name or body
*
* @see Documentation
* on elastic.co
*/
public SimulateTemplateResponse simulateTemplate(SimulateTemplateRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) SimulateTemplateRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Simulate resolving the given template name or body
*
* @param fn
* a function that initializes a builder to create the
* {@link SimulateTemplateRequest}
* @see Documentation
* on elastic.co
*/
public final SimulateTemplateResponse simulateTemplate(
Function> fn)
throws IOException, ElasticsearchException {
return simulateTemplate(fn.apply(new SimulateTemplateRequest.Builder()).build());
}
/**
* Simulate resolving the given template name or body
*
* @see Documentation
* on elastic.co
*/
public SimulateTemplateResponse simulateTemplate() throws IOException, ElasticsearchException {
return this.transport.performRequest(new SimulateTemplateRequest.Builder().build(),
SimulateTemplateRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: indices.split
/**
* Allows you to split an existing index into a new index with more primary
* shards.
*
* @see Documentation
* on elastic.co
*/
public SplitResponse split(SplitRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) SplitRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Allows you to split an existing index into a new index with more primary
* shards.
*
* @param fn
* a function that initializes a builder to create the
* {@link SplitRequest}
* @see Documentation
* on elastic.co
*/
public final SplitResponse split(Function> fn)
throws IOException, ElasticsearchException {
return split(fn.apply(new SplitRequest.Builder()).build());
}
// ----- Endpoint: indices.stats
/**
* Provides statistics on operations happening in an index.
*
* @see Documentation
* on elastic.co
*/
public IndicesStatsResponse stats(IndicesStatsRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) IndicesStatsRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Provides statistics on operations happening in an index.
*
* @param fn
* a function that initializes a builder to create the
* {@link IndicesStatsRequest}
* @see Documentation
* on elastic.co
*/
public final IndicesStatsResponse stats(
Function> fn)
throws IOException, ElasticsearchException {
return stats(fn.apply(new IndicesStatsRequest.Builder()).build());
}
/**
* Provides statistics on operations happening in an index.
*
* @see Documentation
* on elastic.co
*/
public IndicesStatsResponse stats() throws IOException, ElasticsearchException {
return this.transport.performRequest(new IndicesStatsRequest.Builder().build(), IndicesStatsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.unfreeze
/**
* Unfreezes an index. When a frozen index is unfrozen, the index goes through
* the normal recovery process and becomes writeable again.
*
* @see Documentation
* on elastic.co
*/
public UnfreezeResponse unfreeze(UnfreezeRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) UnfreezeRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Unfreezes an index. When a frozen index is unfrozen, the index goes through
* the normal recovery process and becomes writeable again.
*
* @param fn
* a function that initializes a builder to create the
* {@link UnfreezeRequest}
* @see Documentation
* on elastic.co
*/
public final UnfreezeResponse unfreeze(Function> fn)
throws IOException, ElasticsearchException {
return unfreeze(fn.apply(new UnfreezeRequest.Builder()).build());
}
// ----- Endpoint: indices.update_aliases
/**
* Updates index aliases.
*
* @see Documentation
* on elastic.co
*/
public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) UpdateAliasesRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Updates index aliases.
*
* @param fn
* a function that initializes a builder to create the
* {@link UpdateAliasesRequest}
* @see Documentation
* on elastic.co
*/
public final UpdateAliasesResponse updateAliases(
Function> fn)
throws IOException, ElasticsearchException {
return updateAliases(fn.apply(new UpdateAliasesRequest.Builder()).build());
}
/**
* Updates index aliases.
*
* @see Documentation
* on elastic.co
*/
public UpdateAliasesResponse updateAliases() throws IOException, ElasticsearchException {
return this.transport.performRequest(new UpdateAliasesRequest.Builder().build(), UpdateAliasesRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: indices.validate_query
/**
* Allows a user to validate a potentially expensive query without executing it.
*
* @see Documentation
* on elastic.co
*/
public ValidateQueryResponse validateQuery(ValidateQueryRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ValidateQueryRequest._ENDPOINT;
return this.transport.performRequest(request, endpoint, this.transportOptions);
}
/**
* Allows a user to validate a potentially expensive query without executing it.
*
* @param fn
* a function that initializes a builder to create the
* {@link ValidateQueryRequest}
* @see Documentation
* on elastic.co
*/
public final ValidateQueryResponse validateQuery(
Function> fn)
throws IOException, ElasticsearchException {
return validateQuery(fn.apply(new ValidateQueryRequest.Builder()).build());
}
/**
* Allows a user to validate a potentially expensive query without executing it.
*
* @see Documentation
* on elastic.co
*/
public ValidateQueryResponse validateQuery() throws IOException, ElasticsearchException {
return this.transport.performRequest(new ValidateQueryRequest.Builder().build(), ValidateQueryRequest._ENDPOINT,
this.transportOptions);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy