Package co.elastic.clients.elasticsearch
Class ElasticsearchAsyncClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchAsyncClient>
co.elastic.clients.elasticsearch.ElasticsearchAsyncClient
public class ElasticsearchAsyncClient
extends ApiClient<ElasticsearchTransport,ElasticsearchAsyncClient>
Client for the namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchAsyncClient
(ElasticsearchTransport transport) ElasticsearchAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionbulk()
Performs multiple indexing or delete operations in a single API call.bulk
(BulkRequest request) Performs multiple indexing or delete operations in a single API call.final CompletableFuture<BulkResponse>
Performs multiple indexing or delete operations in a single API call.cat()
ccr()
Clears the search context and results for a scrolling search.clearScroll
(ClearScrollRequest request) Clears the search context and results for a scrolling search.Clears the search context and results for a scrolling search.closePointInTime
(ClosePointInTimeRequest request) Closes a point-in-time.closePointInTime
(Function<ClosePointInTimeRequest.Builder, ObjectBuilder<ClosePointInTimeRequest>> fn) Closes a point-in-time.cluster()
count()
Returns number of documents matching a query.count
(CountRequest request) Returns number of documents matching a query.final CompletableFuture<CountResponse>
Returns number of documents matching a query.<TDocument>
CompletableFuture<CreateResponse>create
(CreateRequest<TDocument> request) Adds a JSON document to the specified data stream or index and makes it searchable.final <TDocument>
CompletableFuture<CreateResponse>create
(Function<CreateRequest.Builder<TDocument>, ObjectBuilder<CreateRequest<TDocument>>> fn) Adds a JSON document to the specified data stream or index and makes it searchable.delete
(DeleteRequest request) Removes a JSON document from the specified index.final CompletableFuture<DeleteResponse>
Removes a JSON document from the specified index.deleteByQuery
(DeleteByQueryRequest request) Deletes documents that match the specified query.Deletes documents that match the specified query.Changes the number of requests per second for a particular Delete By Query operation.deleteByQueryRethrottle
(Function<DeleteByQueryRethrottleRequest.Builder, ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Delete By Query operation.deleteScript
(DeleteScriptRequest request) Deletes a stored script or search template.Deletes a stored script or search template.enrich()
eql()
esql()
exists
(ExistsRequest request) Checks if a document in an index exists.final CompletableFuture<BooleanResponse>
Checks if a document in an index exists.existsSource
(ExistsSourceRequest request) Checks if a document's_source
is stored.final CompletableFuture<BooleanResponse>
Checks if a document's_source
is stored.<TDocument>
CompletableFuture<ExplainResponse<TDocument>>explain
(ExplainRequest request, Class<TDocument> tDocumentClass) Returns information about why a specific document matches (or doesn’t match) a query.<TDocument>
CompletableFuture<ExplainResponse<TDocument>>explain
(ExplainRequest request, Type tDocumentType) Returns information about why a specific document matches (or doesn’t match) a query.final <TDocument>
CompletableFuture<ExplainResponse<TDocument>>explain
(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Class<TDocument> tDocumentClass) Returns information about why a specific document matches (or doesn’t match) a query.final <TDocument>
CompletableFuture<ExplainResponse<TDocument>>explain
(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Type tDocumentType) Returns information about why a specific document matches (or doesn’t match) a query.features()
The field capabilities API returns the information about the capabilities of fields among multiple indices.fieldCaps
(FieldCapsRequest request) The field capabilities API returns the information about the capabilities of fields among multiple indices.The field capabilities API returns the information about the capabilities of fields among multiple indices.fleet()
<TDocument>
CompletableFuture<GetResponse<TDocument>>get
(GetRequest request, Class<TDocument> tDocumentClass) Returns a document.<TDocument>
CompletableFuture<GetResponse<TDocument>>get
(GetRequest request, Type tDocumentType) Returns a document.final <TDocument>
CompletableFuture<GetResponse<TDocument>>get
(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Class<TDocument> tDocumentClass) Returns a document.final <TDocument>
CompletableFuture<GetResponse<TDocument>>get
(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Type tDocumentType) Returns a document.getScript
(GetScriptRequest request) Retrieves a stored script or search template.Retrieves a stored script or search template.Returns all script contexts.Returns available script types, languages and contexts<TDocument>
CompletableFuture<GetSourceResponse<TDocument>>getSource
(GetSourceRequest request, Class<TDocument> tDocumentClass) Returns the source of a document.<TDocument>
CompletableFuture<GetSourceResponse<TDocument>>getSource
(GetSourceRequest request, Type tDocumentType) Returns the source of a document.final <TDocument>
CompletableFuture<GetSourceResponse<TDocument>>getSource
(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Class<TDocument> tDocumentClass) Returns the source of a document.final <TDocument>
CompletableFuture<GetSourceResponse<TDocument>>getSource
(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Type tDocumentType) Returns the source of a document.graph()
Returns the health of the cluster.healthReport
(HealthReportRequest request) Returns the health of the cluster.Returns the health of the cluster.ilm()
<TDocument>
CompletableFuture<IndexResponse>index
(IndexRequest<TDocument> request) Adds a JSON document to the specified data stream or index and makes it searchable.final <TDocument>
CompletableFuture<IndexResponse>index
(Function<IndexRequest.Builder<TDocument>, ObjectBuilder<IndexRequest<TDocument>>> fn) Adds a JSON document to the specified data stream or index and makes it searchable.indices()
info()
Returns basic information about the cluster.ingest()
<TDocument>
CompletableFuture<KnnSearchResponse<TDocument>>knnSearch
(KnnSearchRequest request, Class<TDocument> tDocumentClass) Performs a kNN search.<TDocument>
CompletableFuture<KnnSearchResponse<TDocument>>knnSearch
(KnnSearchRequest request, Type tDocumentType) Performs a kNN search.final <TDocument>
CompletableFuture<KnnSearchResponse<TDocument>>knnSearch
(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass) Performs a kNN search.final <TDocument>
CompletableFuture<KnnSearchResponse<TDocument>>knnSearch
(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType) Performs a kNN search.license()
logstash()
<TDocument>
CompletableFuture<MgetResponse<TDocument>>mget
(MgetRequest request, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.<TDocument>
CompletableFuture<MgetResponse<TDocument>>mget
(MgetRequest request, Type tDocumentType) Allows to get multiple documents in one request.final <TDocument>
CompletableFuture<MgetResponse<TDocument>>mget
(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.final <TDocument>
CompletableFuture<MgetResponse<TDocument>>mget
(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Type tDocumentType) Allows to get multiple documents in one request.ml()
<TDocument>
CompletableFuture<MsearchResponse<TDocument>>msearch
(MsearchRequest request, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.<TDocument>
CompletableFuture<MsearchResponse<TDocument>>msearch
(MsearchRequest request, Type tDocumentType) Allows to execute several search operations in one request.final <TDocument>
CompletableFuture<MsearchResponse<TDocument>>msearch
(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.final <TDocument>
CompletableFuture<MsearchResponse<TDocument>>msearch
(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Type tDocumentType) Allows to execute several search operations in one request.<TDocument>
CompletableFuture<MsearchTemplateResponse<TDocument>>msearchTemplate
(MsearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.<TDocument>
CompletableFuture<MsearchTemplateResponse<TDocument>>msearchTemplate
(MsearchTemplateRequest request, Type tDocumentType) Runs multiple templated searches with a single request.final <TDocument>
CompletableFuture<MsearchTemplateResponse<TDocument>>msearchTemplate
(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.final <TDocument>
CompletableFuture<MsearchTemplateResponse<TDocument>>msearchTemplate
(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Type tDocumentType) Runs multiple templated searches with a single request.Returns multiple termvectors in one request.mtermvectors
(MtermvectorsRequest request) Returns multiple termvectors in one request.Returns multiple termvectors in one request.nodes()
openPointInTime
(OpenPointInTimeRequest request) A search request by default executes against the most recent visible data of the target indices, which is called point in time.A search request by default executes against the most recent visible data of the target indices, which is called point in time.ping()
Returns whether the cluster is running.putScript
(PutScriptRequest request) Creates or updates a stored script or search template.Creates or updates a stored script or search template.rankEval
(RankEvalRequest request) Enables you to evaluate the quality of ranked search results over a set of typical search queries.Enables you to evaluate the quality of ranked search results over a set of typical search queries.reindex
(ReindexRequest request) Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.final CompletableFuture<ReindexResponse>
Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.Copies documents from a source to a destination.reindexRethrottle
(Function<ReindexRethrottleRequest.Builder, ObjectBuilder<ReindexRethrottleRequest>> fn) Copies documents from a source to a destination.Renders a search template as a search request body.Renders a search template as a search request body.renderSearchTemplate
(Function<RenderSearchTemplateRequest.Builder, ObjectBuilder<RenderSearchTemplateRequest>> fn) Renders a search template as a search request body.rollup()
<TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>>
scriptsPainlessExecute
(ScriptsPainlessExecuteRequest request, Class<TResult> tResultClass) Runs a script and returns a result.<TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>>
scriptsPainlessExecute
(ScriptsPainlessExecuteRequest request, Type tResultType) Runs a script and returns a result.final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>>
scriptsPainlessExecute
(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Class<TResult> tResultClass) Runs a script and returns a result.final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>>
scriptsPainlessExecute
(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Type tResultType) Runs a script and returns a result.<TDocument>
CompletableFuture<ScrollResponse<TDocument>>scroll
(ScrollRequest request, Class<TDocument> tDocumentClass) Allows to retrieve a large numbers of results from a single search request.<TDocument>
CompletableFuture<ScrollResponse<TDocument>>scroll
(ScrollRequest request, Type tDocumentType) Allows to retrieve a large numbers of results from a single search request.final <TDocument>
CompletableFuture<ScrollResponse<TDocument>>scroll
(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Class<TDocument> tDocumentClass) Allows to retrieve a large numbers of results from a single search request.final <TDocument>
CompletableFuture<ScrollResponse<TDocument>>scroll
(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Type tDocumentType) Allows to retrieve a large numbers of results from a single search request.<TDocument>
CompletableFuture<SearchResponse<TDocument>>search
(SearchRequest request, Class<TDocument> tDocumentClass) Returns search hits that match the query defined in the request.<TDocument>
CompletableFuture<SearchResponse<TDocument>>search
(SearchRequest request, Type tDocumentType) Returns search hits that match the query defined in the request.final <TDocument>
CompletableFuture<SearchResponse<TDocument>>search
(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Class<TDocument> tDocumentClass) Returns search hits that match the query defined in the request.final <TDocument>
CompletableFuture<SearchResponse<TDocument>>search
(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Type tDocumentType) Returns search hits that match the query defined in the request.searchMvt
(SearchMvtRequest request) Searches a vector tile for geospatial values.final CompletableFuture<BinaryResponse>
Searches a vector tile for geospatial values.Returns information about the indices and shards that a search request would be executed against.searchShards
(SearchShardsRequest request) Returns information about the indices and shards that a search request would be executed against.Returns information about the indices and shards that a search request would be executed against.<TDocument>
CompletableFuture<SearchTemplateResponse<TDocument>>searchTemplate
(SearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs a search with a search template.<TDocument>
CompletableFuture<SearchTemplateResponse<TDocument>>searchTemplate
(SearchTemplateRequest request, Type tDocumentType) Runs a search with a search template.final <TDocument>
CompletableFuture<SearchTemplateResponse<TDocument>>searchTemplate
(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs a search with a search template.final <TDocument>
CompletableFuture<SearchTemplateResponse<TDocument>>searchTemplate
(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Type tDocumentType) Runs a search with a search template.security()
shutdown()
slm()
snapshot()
sql()
ssl()
synonyms()
tasks()
termsEnum
(TermsEnumRequest request) The terms enum API can be used to discover terms in the index that begin with the provided string.The terms enum API can be used to discover terms in the index that begin with the provided string.<TDocument>
CompletableFuture<TermvectorsResponse>termvectors
(TermvectorsRequest<TDocument> request) Returns information and statistics about terms in the fields of a particular document.final <TDocument>
CompletableFuture<TermvectorsResponse>termvectors
(Function<TermvectorsRequest.Builder<TDocument>, ObjectBuilder<TermvectorsRequest<TDocument>>> fn) Returns information and statistics about terms in the fields of a particular document.<TDocument,
TPartialDocument>
CompletableFuture<UpdateResponse<TDocument>>update
(UpdateRequest<TDocument, TPartialDocument> request, Class<TDocument> tDocumentClass) Updates a document with a script or partial document.<TDocument,
TPartialDocument>
CompletableFuture<UpdateResponse<TDocument>>update
(UpdateRequest<TDocument, TPartialDocument> request, Type tDocumentType) Updates a document with a script or partial document.final <TDocument,
TPartialDocument>
CompletableFuture<UpdateResponse<TDocument>>update
(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateRequest<TDocument, TPartialDocument>>> fn, Class<TDocument> tDocumentClass) Updates a document with a script or partial document.final <TDocument,
TPartialDocument>
CompletableFuture<UpdateResponse<TDocument>>update
(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateRequest<TDocument, TPartialDocument>>> fn, Type tDocumentType) Updates a document with a script or partial document.updateByQuery
(UpdateByQueryRequest request) Updates documents that match the specified query.Updates documents that match the specified query.Changes the number of requests per second for a particular Update By Query operation.updateByQueryRethrottle
(Function<UpdateByQueryRethrottleRequest.Builder, ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Update By Query operation.watcher()
withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsxpack()
Methods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchAsyncClient
-
ElasticsearchAsyncClient
public ElasticsearchAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchAsyncClient>
-
asyncSearch
-
autoscaling
-
cat
-
ccr
-
cluster
-
connector
-
danglingIndices
-
enrich
-
eql
-
esql
-
features
-
fleet
-
graph
-
ilm
-
indices
-
inference
-
ingest
-
license
-
logstash
-
migration
-
ml
-
monitoring
-
nodes
-
queryRules
-
rollup
-
searchApplication
-
searchableSnapshots
-
security
-
shutdown
-
slm
-
snapshot
-
sql
-
ssl
-
synonyms
-
tasks
-
textStructure
-
transform
-
watcher
-
xpack
-
bulk
Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed.- See Also:
-
bulk
public final CompletableFuture<BulkResponse> bulk(Function<BulkRequest.Builder, ObjectBuilder<BulkRequest>> fn) Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed.- Parameters:
fn
- a function that initializes a builder to create theBulkRequest
- See Also:
-
bulk
Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed.- See Also:
-
clearScroll
Clears the search context and results for a scrolling search.- See Also:
-
clearScroll
public final CompletableFuture<ClearScrollResponse> clearScroll(Function<ClearScrollRequest.Builder, ObjectBuilder<ClearScrollRequest>> fn) Clears the search context and results for a scrolling search.- Parameters:
fn
- a function that initializes a builder to create theClearScrollRequest
- See Also:
-
clearScroll
Clears the search context and results for a scrolling search.- See Also:
-
closePointInTime
public CompletableFuture<ClosePointInTimeResponse> closePointInTime(ClosePointInTimeRequest request) Closes a point-in-time.- See Also:
-
closePointInTime
public final CompletableFuture<ClosePointInTimeResponse> closePointInTime(Function<ClosePointInTimeRequest.Builder, ObjectBuilder<ClosePointInTimeRequest>> fn) Closes a point-in-time.- Parameters:
fn
- a function that initializes a builder to create theClosePointInTimeRequest
- See Also:
-
count
Returns number of documents matching a query.- See Also:
-
count
public final CompletableFuture<CountResponse> count(Function<CountRequest.Builder, ObjectBuilder<CountRequest>> fn) Returns number of documents matching a query.- Parameters:
fn
- a function that initializes a builder to create theCountRequest
- See Also:
-
count
Returns number of documents matching a query.- See Also:
-
create
Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.- See Also:
-
create
public final <TDocument> CompletableFuture<CreateResponse> create(Function<CreateRequest.Builder<TDocument>, ObjectBuilder<CreateRequest<TDocument>>> fn) Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.- Parameters:
fn
- a function that initializes a builder to create theCreateRequest
- See Also:
-
delete
Removes a JSON document from the specified index.- See Also:
-
delete
public final CompletableFuture<DeleteResponse> delete(Function<DeleteRequest.Builder, ObjectBuilder<DeleteRequest>> fn) Removes a JSON document from the specified index.- Parameters:
fn
- a function that initializes a builder to create theDeleteRequest
- See Also:
-
deleteByQuery
Deletes documents that match the specified query.- See Also:
-
deleteByQuery
public final CompletableFuture<DeleteByQueryResponse> deleteByQuery(Function<DeleteByQueryRequest.Builder, ObjectBuilder<DeleteByQueryRequest>> fn) Deletes documents that match the specified query.- Parameters:
fn
- a function that initializes a builder to create theDeleteByQueryRequest
- See Also:
-
deleteByQueryRethrottle
public CompletableFuture<DeleteByQueryRethrottleResponse> deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) Changes the number of requests per second for a particular Delete By Query operation.- See Also:
-
deleteByQueryRethrottle
public final CompletableFuture<DeleteByQueryRethrottleResponse> deleteByQueryRethrottle(Function<DeleteByQueryRethrottleRequest.Builder, ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Delete By Query operation.- Parameters:
fn
- a function that initializes a builder to create theDeleteByQueryRethrottleRequest
- See Also:
-
deleteScript
Deletes a stored script or search template.- See Also:
-
deleteScript
public final CompletableFuture<DeleteScriptResponse> deleteScript(Function<DeleteScriptRequest.Builder, ObjectBuilder<DeleteScriptRequest>> fn) Deletes a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create theDeleteScriptRequest
- See Also:
-
exists
Checks if a document in an index exists.- See Also:
-
exists
public final CompletableFuture<BooleanResponse> exists(Function<ExistsRequest.Builder, ObjectBuilder<ExistsRequest>> fn) Checks if a document in an index exists.- Parameters:
fn
- a function that initializes a builder to create theExistsRequest
- See Also:
-
existsSource
Checks if a document's_source
is stored.- See Also:
-
existsSource
public final CompletableFuture<BooleanResponse> existsSource(Function<ExistsSourceRequest.Builder, ObjectBuilder<ExistsSourceRequest>> fn) Checks if a document's_source
is stored.- Parameters:
fn
- a function that initializes a builder to create theExistsSourceRequest
- See Also:
-
explain
public <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(ExplainRequest request, Class<TDocument> tDocumentClass) Returns information about why a specific document matches (or doesn’t match) a query.- See Also:
-
explain
public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Class<TDocument> tDocumentClass) Returns information about why a specific document matches (or doesn’t match) a query.- Parameters:
fn
- a function that initializes a builder to create theExplainRequest
- See Also:
-
explain
public <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(ExplainRequest request, Type tDocumentType) Returns information about why a specific document matches (or doesn’t match) a query.- See Also:
-
explain
public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Type tDocumentType) Returns information about why a specific document matches (or doesn’t match) a query.- Parameters:
fn
- a function that initializes a builder to create theExplainRequest
- See Also:
-
fieldCaps
The field capabilities API returns the information about the capabilities of fields among multiple indices. The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type of keyword is returned as any other field that belongs to thekeyword
family.- See Also:
-
fieldCaps
public final CompletableFuture<FieldCapsResponse> fieldCaps(Function<FieldCapsRequest.Builder, ObjectBuilder<FieldCapsRequest>> fn) The field capabilities API returns the information about the capabilities of fields among multiple indices. The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type of keyword is returned as any other field that belongs to thekeyword
family.- Parameters:
fn
- a function that initializes a builder to create theFieldCapsRequest
- See Also:
-
fieldCaps
The field capabilities API returns the information about the capabilities of fields among multiple indices. The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type of keyword is returned as any other field that belongs to thekeyword
family.- See Also:
-
get
public <TDocument> CompletableFuture<GetResponse<TDocument>> get(GetRequest request, Class<TDocument> tDocumentClass) Returns a document.- See Also:
-
get
public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Class<TDocument> tDocumentClass) Returns a document.- Parameters:
fn
- a function that initializes a builder to create theGetRequest
- See Also:
-
get
public <TDocument> CompletableFuture<GetResponse<TDocument>> get(GetRequest request, Type tDocumentType) Returns a document.- See Also:
-
get
public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Type tDocumentType) Returns a document.- Parameters:
fn
- a function that initializes a builder to create theGetRequest
- See Also:
-
getScript
Retrieves a stored script or search template.- See Also:
-
getScript
public final CompletableFuture<GetScriptResponse> getScript(Function<GetScriptRequest.Builder, ObjectBuilder<GetScriptRequest>> fn) Retrieves a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create theGetScriptRequest
- See Also:
-
getScriptContext
Returns all script contexts.- See Also:
-
getScriptLanguages
Returns available script types, languages and contexts- See Also:
-
getSource
public <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSource(GetSourceRequest request, Class<TDocument> tDocumentClass) Returns the source of a document.- See Also:
-
getSource
public final <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSource(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Class<TDocument> tDocumentClass) Returns the source of a document.- Parameters:
fn
- a function that initializes a builder to create theGetSourceRequest
- See Also:
-
getSource
public <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSource(GetSourceRequest request, Type tDocumentType) Returns the source of a document.- See Also:
-
getSource
public final <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSource(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Type tDocumentType) Returns the source of a document.- Parameters:
fn
- a function that initializes a builder to create theGetSourceRequest
- See Also:
-
healthReport
Returns the health of the cluster.- See Also:
-
healthReport
public final CompletableFuture<HealthReportResponse> healthReport(Function<HealthReportRequest.Builder, ObjectBuilder<HealthReportRequest>> fn) Returns the health of the cluster.- Parameters:
fn
- a function that initializes a builder to create theHealthReportRequest
- See Also:
-
healthReport
Returns the health of the cluster.- See Also:
-
index
Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.- See Also:
-
index
public final <TDocument> CompletableFuture<IndexResponse> index(Function<IndexRequest.Builder<TDocument>, ObjectBuilder<IndexRequest<TDocument>>> fn) Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.- Parameters:
fn
- a function that initializes a builder to create theIndexRequest
- See Also:
-
info
Returns basic information about the cluster.- See Also:
-
knnSearch
public <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(KnnSearchRequest request, Class<TDocument> tDocumentClass) Performs a kNN search.- See Also:
-
knnSearch
public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass) Performs a kNN search.- Parameters:
fn
- a function that initializes a builder to create theKnnSearchRequest
- See Also:
-
knnSearch
public <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(KnnSearchRequest request, Type tDocumentType) Performs a kNN search.- See Also:
-
knnSearch
public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType) Performs a kNN search.- Parameters:
fn
- a function that initializes a builder to create theKnnSearchRequest
- See Also:
-
mget
public <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(MgetRequest request, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.- See Also:
-
mget
public final <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.- Parameters:
fn
- a function that initializes a builder to create theMgetRequest
- See Also:
-
mget
public <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(MgetRequest request, Type tDocumentType) Allows to get multiple documents in one request.- See Also:
-
mget
public final <TDocument> CompletableFuture<MgetResponse<TDocument>> mget(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Type tDocumentType) Allows to get multiple documents in one request.- Parameters:
fn
- a function that initializes a builder to create theMgetRequest
- See Also:
-
msearch
public <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(MsearchRequest request, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.- See Also:
-
msearch
public final <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.- Parameters:
fn
- a function that initializes a builder to create theMsearchRequest
- See Also:
-
msearch
public <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(MsearchRequest request, Type tDocumentType) Allows to execute several search operations in one request.- See Also:
-
msearch
public final <TDocument> CompletableFuture<MsearchResponse<TDocument>> msearch(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Type tDocumentType) Allows to execute several search operations in one request.- Parameters:
fn
- a function that initializes a builder to create theMsearchRequest
- See Also:
-
msearchTemplate
public <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> msearchTemplate(MsearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.- See Also:
-
msearchTemplate
public final <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> msearchTemplate(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.- Parameters:
fn
- a function that initializes a builder to create theMsearchTemplateRequest
- See Also:
-
msearchTemplate
public <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> msearchTemplate(MsearchTemplateRequest request, Type tDocumentType) Runs multiple templated searches with a single request.- See Also:
-
msearchTemplate
public final <TDocument> CompletableFuture<MsearchTemplateResponse<TDocument>> msearchTemplate(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Type tDocumentType) Runs multiple templated searches with a single request.- Parameters:
fn
- a function that initializes a builder to create theMsearchTemplateRequest
- See Also:
-
mtermvectors
Returns multiple termvectors in one request.- See Also:
-
mtermvectors
public final CompletableFuture<MtermvectorsResponse> mtermvectors(Function<MtermvectorsRequest.Builder, ObjectBuilder<MtermvectorsRequest>> fn) Returns multiple termvectors in one request.- Parameters:
fn
- a function that initializes a builder to create theMtermvectorsRequest
- See Also:
-
mtermvectors
Returns multiple termvectors in one request.- See Also:
-
openPointInTime
A search request by default executes against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple search requests using the same point in time. For example, if refreshes happen betweensearch_after
requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time.- See Also:
-
openPointInTime
public final CompletableFuture<OpenPointInTimeResponse> openPointInTime(Function<OpenPointInTimeRequest.Builder, ObjectBuilder<OpenPointInTimeRequest>> fn) A search request by default executes against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple search requests using the same point in time. For example, if refreshes happen betweensearch_after
requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time.- Parameters:
fn
- a function that initializes a builder to create theOpenPointInTimeRequest
- See Also:
-
ping
Returns whether the cluster is running.- See Also:
-
putScript
Creates or updates a stored script or search template.- See Also:
-
putScript
public final CompletableFuture<PutScriptResponse> putScript(Function<PutScriptRequest.Builder, ObjectBuilder<PutScriptRequest>> fn) Creates or updates a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create thePutScriptRequest
- See Also:
-
rankEval
Enables you to evaluate the quality of ranked search results over a set of typical search queries.- See Also:
-
rankEval
public final CompletableFuture<RankEvalResponse> rankEval(Function<RankEvalRequest.Builder, ObjectBuilder<RankEvalRequest>> fn) Enables you to evaluate the quality of ranked search results over a set of typical search queries.- Parameters:
fn
- a function that initializes a builder to create theRankEvalRequest
- See Also:
-
reindex
Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.- See Also:
-
reindex
public final CompletableFuture<ReindexResponse> reindex(Function<ReindexRequest.Builder, ObjectBuilder<ReindexRequest>> fn) Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.- Parameters:
fn
- a function that initializes a builder to create theReindexRequest
- See Also:
-
reindexRethrottle
public CompletableFuture<ReindexRethrottleResponse> reindexRethrottle(ReindexRethrottleRequest request) Copies documents from a source to a destination.- See Also:
-
reindexRethrottle
public final CompletableFuture<ReindexRethrottleResponse> reindexRethrottle(Function<ReindexRethrottleRequest.Builder, ObjectBuilder<ReindexRethrottleRequest>> fn) Copies documents from a source to a destination.- Parameters:
fn
- a function that initializes a builder to create theReindexRethrottleRequest
- See Also:
-
renderSearchTemplate
public CompletableFuture<RenderSearchTemplateResponse> renderSearchTemplate(RenderSearchTemplateRequest request) Renders a search template as a search request body.- See Also:
-
renderSearchTemplate
public final CompletableFuture<RenderSearchTemplateResponse> renderSearchTemplate(Function<RenderSearchTemplateRequest.Builder, ObjectBuilder<RenderSearchTemplateRequest>> fn) Renders a search template as a search request body.- Parameters:
fn
- a function that initializes a builder to create theRenderSearchTemplateRequest
- See Also:
-
renderSearchTemplate
Renders a search template as a search request body.- See Also:
-
scriptsPainlessExecute
public <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>> scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, Class<TResult> tResultClass) Runs a script and returns a result.- See Also:
-
scriptsPainlessExecute
public final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>> scriptsPainlessExecute(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Class<TResult> tResultClass) Runs a script and returns a result.- Parameters:
fn
- a function that initializes a builder to create theScriptsPainlessExecuteRequest
- See Also:
-
scriptsPainlessExecute
public <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>> scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, Type tResultType) Runs a script and returns a result.- See Also:
-
scriptsPainlessExecute
public final <TResult> CompletableFuture<ScriptsPainlessExecuteResponse<TResult>> scriptsPainlessExecute(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Type tResultType) Runs a script and returns a result.- Parameters:
fn
- a function that initializes a builder to create theScriptsPainlessExecuteRequest
- See Also:
-
scroll
public <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(ScrollRequest request, Class<TDocument> tDocumentClass) Allows to retrieve a large numbers of results from a single search request.- See Also:
-
scroll
public final <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Class<TDocument> tDocumentClass) Allows to retrieve a large numbers of results from a single search request.- Parameters:
fn
- a function that initializes a builder to create theScrollRequest
- See Also:
-
scroll
public <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(ScrollRequest request, Type tDocumentType) Allows to retrieve a large numbers of results from a single search request.- See Also:
-
scroll
public final <TDocument> CompletableFuture<ScrollResponse<TDocument>> scroll(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Type tDocumentType) Allows to retrieve a large numbers of results from a single search request.- Parameters:
fn
- a function that initializes a builder to create theScrollRequest
- See Also:
-
search
public <TDocument> CompletableFuture<SearchResponse<TDocument>> search(SearchRequest request, Class<TDocument> tDocumentClass) Returns search hits that match the query defined in the request. You can provide search queries using theq
query string parameter or the request body. If both are specified, only the query parameter is used.- See Also:
-
search
public final <TDocument> CompletableFuture<SearchResponse<TDocument>> search(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Class<TDocument> tDocumentClass) Returns search hits that match the query defined in the request. You can provide search queries using theq
query string parameter or the request body. If both are specified, only the query parameter is used.- Parameters:
fn
- a function that initializes a builder to create theSearchRequest
- See Also:
-
search
public <TDocument> CompletableFuture<SearchResponse<TDocument>> search(SearchRequest request, Type tDocumentType) Returns search hits that match the query defined in the request. You can provide search queries using theq
query string parameter or the request body. If both are specified, only the query parameter is used.- See Also:
-
search
public final <TDocument> CompletableFuture<SearchResponse<TDocument>> search(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Type tDocumentType) Returns search hits that match the query defined in the request. You can provide search queries using theq
query string parameter or the request body. If both are specified, only the query parameter is used.- Parameters:
fn
- a function that initializes a builder to create theSearchRequest
- See Also:
-
searchMvt
Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.- See Also:
-
searchMvt
public final CompletableFuture<BinaryResponse> searchMvt(Function<SearchMvtRequest.Builder, ObjectBuilder<SearchMvtRequest>> fn) Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.- Parameters:
fn
- a function that initializes a builder to create theSearchMvtRequest
- See Also:
-
searchShards
Returns information about the indices and shards that a search request would be executed against.- See Also:
-
searchShards
public final CompletableFuture<SearchShardsResponse> searchShards(Function<SearchShardsRequest.Builder, ObjectBuilder<SearchShardsRequest>> fn) Returns information about the indices and shards that a search request would be executed against.- Parameters:
fn
- a function that initializes a builder to create theSearchShardsRequest
- See Also:
-
searchShards
Returns information about the indices and shards that a search request would be executed against.- See Also:
-
searchTemplate
public <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> searchTemplate(SearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs a search with a search template.- See Also:
-
searchTemplate
public final <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> searchTemplate(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs a search with a search template.- Parameters:
fn
- a function that initializes a builder to create theSearchTemplateRequest
- See Also:
-
searchTemplate
public <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> searchTemplate(SearchTemplateRequest request, Type tDocumentType) Runs a search with a search template.- See Also:
-
searchTemplate
public final <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> searchTemplate(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Type tDocumentType) Runs a search with a search template.- Parameters:
fn
- a function that initializes a builder to create theSearchTemplateRequest
- See Also:
-
termsEnum
The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.- See Also:
-
termsEnum
public final CompletableFuture<TermsEnumResponse> termsEnum(Function<TermsEnumRequest.Builder, ObjectBuilder<TermsEnumRequest>> fn) The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.- Parameters:
fn
- a function that initializes a builder to create theTermsEnumRequest
- See Also:
-
termvectors
public <TDocument> CompletableFuture<TermvectorsResponse> termvectors(TermvectorsRequest<TDocument> request) Returns information and statistics about terms in the fields of a particular document.- See Also:
-
termvectors
public final <TDocument> CompletableFuture<TermvectorsResponse> termvectors(Function<TermvectorsRequest.Builder<TDocument>, ObjectBuilder<TermvectorsRequest<TDocument>>> fn) Returns information and statistics about terms in the fields of a particular document.- Parameters:
fn
- a function that initializes a builder to create theTermvectorsRequest
- See Also:
-
update
public <TDocument,TPartialDocument> CompletableFuture<UpdateResponse<TDocument>> update(UpdateRequest<TDocument, TPartialDocument> request, Class<TDocument> tDocumentClass) Updates a document with a script or partial document.- See Also:
-
update
public final <TDocument,TPartialDocument> CompletableFuture<UpdateResponse<TDocument>> update(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateRequest<TDocument, TPartialDocument>>> fn, Class<TDocument> tDocumentClass) Updates a document with a script or partial document.- Parameters:
fn
- a function that initializes a builder to create theUpdateRequest
- See Also:
-
update
public <TDocument,TPartialDocument> CompletableFuture<UpdateResponse<TDocument>> update(UpdateRequest<TDocument, TPartialDocument> request, Type tDocumentType) Updates a document with a script or partial document.- See Also:
-
update
public final <TDocument,TPartialDocument> CompletableFuture<UpdateResponse<TDocument>> update(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateRequest<TDocument, TPartialDocument>>> fn, Type tDocumentType) Updates a document with a script or partial document.- Parameters:
fn
- a function that initializes a builder to create theUpdateRequest
- See Also:
-
updateByQuery
Updates documents that match the specified query. If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.- See Also:
-
updateByQuery
public final CompletableFuture<UpdateByQueryResponse> updateByQuery(Function<UpdateByQueryRequest.Builder, ObjectBuilder<UpdateByQueryRequest>> fn) Updates documents that match the specified query. If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.- Parameters:
fn
- a function that initializes a builder to create theUpdateByQueryRequest
- See Also:
-
updateByQueryRethrottle
public CompletableFuture<UpdateByQueryRethrottleResponse> updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) Changes the number of requests per second for a particular Update By Query operation.- See Also:
-
updateByQueryRethrottle
public final CompletableFuture<UpdateByQueryRethrottleResponse> updateByQueryRethrottle(Function<UpdateByQueryRethrottleRequest.Builder, ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Update By Query operation.- Parameters:
fn
- a function that initializes a builder to create theUpdateByQueryRethrottleRequest
- See Also:
-