Package co.elastic.clients.elasticsearch
Class ElasticsearchClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchClient>
co.elastic.clients.elasticsearch.ElasticsearchClient
Client for the namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchClient
(ElasticsearchTransport transport) ElasticsearchClient
(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 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.final ClearScrollResponse
Clears the search context and results for a scrolling search.closePointInTime
(ClosePointInTimeRequest request) Closes a point-in-time.final ClosePointInTimeResponse
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 CountResponse
Returns number of documents matching a query.<TDocument>
CreateResponsecreate
(CreateRequest<TDocument> request) Adds a JSON document to the specified data stream or index and makes it searchable.final <TDocument>
CreateResponsecreate
(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 DeleteResponse
Removes a JSON document from the specified index.deleteByQuery
(DeleteByQueryRequest request) Deletes documents that match the specified query.final DeleteByQueryResponse
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.final DeleteScriptResponse
Deletes a stored script or search template.enrich()
eql()
esql()
exists
(ExistsRequest request) Checks if a document in an index exists.final BooleanResponse
Checks if a document in an index exists.existsSource
(ExistsSourceRequest request) Checks if a document's_source
is stored.final BooleanResponse
Checks if a document's_source
is stored.<TDocument>
ExplainResponse<TDocument>explain
(ExplainRequest request, Class<TDocument> tDocumentClass) Returns information about why a specific document matches (or doesn’t match) a query.<TDocument>
ExplainResponse<TDocument>explain
(ExplainRequest request, Type tDocumentType) Returns information about why a specific document matches (or doesn’t match) a query.final <TDocument>
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>
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.final FieldCapsResponse
The field capabilities API returns the information about the capabilities of fields among multiple indices.fleet()
<TDocument>
GetResponse<TDocument>get
(GetRequest request, Class<TDocument> tDocumentClass) Returns a document.<TDocument>
GetResponse<TDocument>get
(GetRequest request, Type tDocumentType) Returns a document.final <TDocument>
GetResponse<TDocument>get
(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Class<TDocument> tDocumentClass) Returns a document.final <TDocument>
GetResponse<TDocument>get
(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Type tDocumentType) Returns a document.getScript
(GetScriptRequest request) Retrieves a stored script or search template.final GetScriptResponse
Retrieves a stored script or search template.Returns all script contexts.Returns available script types, languages and contexts<TDocument>
GetSourceResponse<TDocument>getSource
(GetSourceRequest request, Class<TDocument> tDocumentClass) Returns the source of a document.<TDocument>
GetSourceResponse<TDocument>getSource
(GetSourceRequest request, Type tDocumentType) Returns the source of a document.final <TDocument>
GetSourceResponse<TDocument>getSource
(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Class<TDocument> tDocumentClass) Returns the source of a document.final <TDocument>
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.final HealthReportResponse
Returns the health of the cluster.ilm()
<TDocument>
IndexResponseindex
(IndexRequest<TDocument> request) Adds a JSON document to the specified data stream or index and makes it searchable.final <TDocument>
IndexResponseindex
(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>
KnnSearchResponse<TDocument>knnSearch
(KnnSearchRequest request, Class<TDocument> tDocumentClass) Performs a kNN search.<TDocument>
KnnSearchResponse<TDocument>knnSearch
(KnnSearchRequest request, Type tDocumentType) Performs a kNN search.final <TDocument>
KnnSearchResponse<TDocument>knnSearch
(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass) Performs a kNN search.final <TDocument>
KnnSearchResponse<TDocument>knnSearch
(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType) Performs a kNN search.license()
logstash()
<TDocument>
MgetResponse<TDocument>mget
(MgetRequest request, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.<TDocument>
MgetResponse<TDocument>mget
(MgetRequest request, Type tDocumentType) Allows to get multiple documents in one request.final <TDocument>
MgetResponse<TDocument>mget
(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Class<TDocument> tDocumentClass) Allows to get multiple documents in one request.final <TDocument>
MgetResponse<TDocument>mget
(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Type tDocumentType) Allows to get multiple documents in one request.ml()
<TDocument>
MsearchResponse<TDocument>msearch
(MsearchRequest request, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.<TDocument>
MsearchResponse<TDocument>msearch
(MsearchRequest request, Type tDocumentType) Allows to execute several search operations in one request.final <TDocument>
MsearchResponse<TDocument>msearch
(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Class<TDocument> tDocumentClass) Allows to execute several search operations in one request.final <TDocument>
MsearchResponse<TDocument>msearch
(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Type tDocumentType) Allows to execute several search operations in one request.<TDocument>
MsearchTemplateResponse<TDocument>msearchTemplate
(MsearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.<TDocument>
MsearchTemplateResponse<TDocument>msearchTemplate
(MsearchTemplateRequest request, Type tDocumentType) Runs multiple templated searches with a single request.final <TDocument>
MsearchTemplateResponse<TDocument>msearchTemplate
(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs multiple templated searches with a single request.final <TDocument>
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.final MtermvectorsResponse
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.final OpenPointInTimeResponse
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.final PutScriptResponse
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.final RankEvalResponse
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 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> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute
(ScriptsPainlessExecuteRequest request, Class<TResult> tResultClass) Runs a script and returns a result.<TResult> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute
(ScriptsPainlessExecuteRequest request, Type tResultType) Runs a script and returns a result.final <TResult> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute
(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Class<TResult> tResultClass) Runs a script and returns a result.final <TResult> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute
(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Type tResultType) Runs a script and returns a result.<TDocument>
ScrollResponse<TDocument>scroll
(ScrollRequest request, Class<TDocument> tDocumentClass) Allows to retrieve a large numbers of results from a single search request.<TDocument>
ScrollResponse<TDocument>scroll
(ScrollRequest request, Type tDocumentType) Allows to retrieve a large numbers of results from a single search request.final <TDocument>
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>
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>
SearchResponse<TDocument>search
(SearchRequest request, Class<TDocument> tDocumentClass) Returns search hits that match the query defined in the request.<TDocument>
SearchResponse<TDocument>search
(SearchRequest request, Type tDocumentType) Returns search hits that match the query defined in the request.final <TDocument>
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>
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 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.final SearchShardsResponse
Returns information about the indices and shards that a search request would be executed against.<TDocument>
SearchTemplateResponse<TDocument>searchTemplate
(SearchTemplateRequest request, Class<TDocument> tDocumentClass) Runs a search with a search template.<TDocument>
SearchTemplateResponse<TDocument>searchTemplate
(SearchTemplateRequest request, Type tDocumentType) Runs a search with a search template.final <TDocument>
SearchTemplateResponse<TDocument>searchTemplate
(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) Runs a search with a search template.final <TDocument>
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.final TermsEnumResponse
The terms enum API can be used to discover terms in the index that begin with the provided string.<TDocument>
TermvectorsResponsetermvectors
(TermvectorsRequest<TDocument> request) Returns information and statistics about terms in the fields of a particular document.final <TDocument>
TermvectorsResponsetermvectors
(Function<TermvectorsRequest.Builder<TDocument>, ObjectBuilder<TermvectorsRequest<TDocument>>> fn) Returns information and statistics about terms in the fields of a particular document.<TDocument,
TPartialDocument>
UpdateResponse<TDocument>update
(UpdateRequest<TDocument, TPartialDocument> request, Class<TDocument> tDocumentClass) Updates a document with a script or partial document.<TDocument,
TPartialDocument>
UpdateResponse<TDocument>update
(UpdateRequest<TDocument, TPartialDocument> request, Type tDocumentType) Updates a document with a script or partial document.final <TDocument,
TPartialDocument>
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>
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.final UpdateByQueryResponse
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
-
ElasticsearchClient
-
ElasticsearchClient
public ElasticsearchClient(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,
ElasticsearchClient>
-
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.- Throws:
IOException
ElasticsearchException
- See Also:
-
bulk
public final BulkResponse bulk(Function<BulkRequest.Builder, ObjectBuilder<BulkRequest>> fn) throws IOException, ElasticsearchExceptionPerforms 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
bulk
Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed.- Throws:
IOException
ElasticsearchException
- See Also:
-
clearScroll
public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOException, ElasticsearchException Clears the search context and results for a scrolling search.- Throws:
IOException
ElasticsearchException
- See Also:
-
clearScroll
public final ClearScrollResponse clearScroll(Function<ClearScrollRequest.Builder, ObjectBuilder<ClearScrollRequest>> fn) throws IOException, ElasticsearchExceptionClears the search context and results for a scrolling search.- Parameters:
fn
- a function that initializes a builder to create theClearScrollRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
clearScroll
Clears the search context and results for a scrolling search.- Throws:
IOException
ElasticsearchException
- See Also:
-
closePointInTime
public ClosePointInTimeResponse closePointInTime(ClosePointInTimeRequest request) throws IOException, ElasticsearchException Closes a point-in-time.- Throws:
IOException
ElasticsearchException
- See Also:
-
closePointInTime
public final ClosePointInTimeResponse closePointInTime(Function<ClosePointInTimeRequest.Builder, ObjectBuilder<ClosePointInTimeRequest>> fn) throws IOException, ElasticsearchExceptionCloses a point-in-time.- Parameters:
fn
- a function that initializes a builder to create theClosePointInTimeRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
count
Returns number of documents matching a query.- Throws:
IOException
ElasticsearchException
- See Also:
-
count
public final CountResponse count(Function<CountRequest.Builder, ObjectBuilder<CountRequest>> fn) throws IOException, ElasticsearchExceptionReturns number of documents matching a query.- Parameters:
fn
- a function that initializes a builder to create theCountRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
count
Returns number of documents matching a query.- Throws:
IOException
ElasticsearchException
- See Also:
-
create
public <TDocument> CreateResponse create(CreateRequest<TDocument> request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
create
public final <TDocument> CreateResponse create(Function<CreateRequest.Builder<TDocument>, ObjectBuilder<CreateRequest<TDocument>>> fn) throws IOException, ElasticsearchExceptionAdds 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
Removes a JSON document from the specified index.- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public final DeleteResponse delete(Function<DeleteRequest.Builder, ObjectBuilder<DeleteRequest>> fn) throws IOException, ElasticsearchExceptionRemoves a JSON document from the specified index.- Parameters:
fn
- a function that initializes a builder to create theDeleteRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteByQuery
public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) throws IOException, ElasticsearchException Deletes documents that match the specified query.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteByQuery
public final DeleteByQueryResponse deleteByQuery(Function<DeleteByQueryRequest.Builder, ObjectBuilder<DeleteByQueryRequest>> fn) throws IOException, ElasticsearchExceptionDeletes documents that match the specified query.- Parameters:
fn
- a function that initializes a builder to create theDeleteByQueryRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteByQueryRethrottle
public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) throws IOException, ElasticsearchException Changes the number of requests per second for a particular Delete By Query operation.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteByQueryRethrottle
public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle(Function<DeleteByQueryRethrottleRequest.Builder, ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) throws IOException, ElasticsearchExceptionChanges the number of requests per second for a particular Delete By Query operation.- Parameters:
fn
- a function that initializes a builder to create theDeleteByQueryRethrottleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteScript
public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOException, ElasticsearchException Deletes a stored script or search template.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteScript
public final DeleteScriptResponse deleteScript(Function<DeleteScriptRequest.Builder, ObjectBuilder<DeleteScriptRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create theDeleteScriptRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
exists
Checks if a document in an index exists.- Throws:
IOException
ElasticsearchException
- See Also:
-
exists
public final BooleanResponse exists(Function<ExistsRequest.Builder, ObjectBuilder<ExistsRequest>> fn) throws IOException, ElasticsearchExceptionChecks if a document in an index exists.- Parameters:
fn
- a function that initializes a builder to create theExistsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
existsSource
public BooleanResponse existsSource(ExistsSourceRequest request) throws IOException, ElasticsearchException Checks if a document's_source
is stored.- Throws:
IOException
ElasticsearchException
- See Also:
-
existsSource
public final BooleanResponse existsSource(Function<ExistsSourceRequest.Builder, ObjectBuilder<ExistsSourceRequest>> fn) throws IOException, ElasticsearchExceptionChecks if a document's_source
is stored.- Parameters:
fn
- a function that initializes a builder to create theExistsSourceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
explain
public <TDocument> ExplainResponse<TDocument> explain(ExplainRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Returns information about why a specific document matches (or doesn’t match) a query.- Throws:
IOException
ElasticsearchException
- See Also:
-
explain
public final <TDocument> ExplainResponse<TDocument> explain(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionReturns information about why a specific document matches (or doesn’t match) a query.- Parameters:
fn
- a function that initializes a builder to create theExplainRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
explain
public <TDocument> ExplainResponse<TDocument> explain(ExplainRequest request, Type tDocumentType) throws IOException, ElasticsearchException Returns information about why a specific document matches (or doesn’t match) a query.- Throws:
IOException
ElasticsearchException
- See Also:
-
explain
public final <TDocument> ExplainResponse<TDocument> explain(Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionReturns information about why a specific document matches (or doesn’t match) a query.- Parameters:
fn
- a function that initializes a builder to create theExplainRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
fieldCaps
public FieldCapsResponse fieldCaps(FieldCapsRequest request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
fieldCaps
public final FieldCapsResponse fieldCaps(Function<FieldCapsRequest.Builder, ObjectBuilder<FieldCapsRequest>> fn) throws IOException, ElasticsearchExceptionThe 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
- Throws:
IOException
ElasticsearchException
- 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public <TDocument> GetResponse<TDocument> get(GetRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Returns a document.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final <TDocument> GetResponse<TDocument> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionReturns a document.- Parameters:
fn
- a function that initializes a builder to create theGetRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public <TDocument> GetResponse<TDocument> get(GetRequest request, Type tDocumentType) throws IOException, ElasticsearchException Returns a document.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final <TDocument> GetResponse<TDocument> get(Function<GetRequest.Builder, ObjectBuilder<GetRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionReturns a document.- Parameters:
fn
- a function that initializes a builder to create theGetRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getScript
public GetScriptResponse getScript(GetScriptRequest request) throws IOException, ElasticsearchException Retrieves a stored script or search template.- Throws:
IOException
ElasticsearchException
- See Also:
-
getScript
public final GetScriptResponse getScript(Function<GetScriptRequest.Builder, ObjectBuilder<GetScriptRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create theGetScriptRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getScriptContext
Returns all script contexts.- Throws:
IOException
ElasticsearchException
- See Also:
-
getScriptLanguages
Returns available script types, languages and contexts- Throws:
IOException
ElasticsearchException
- See Also:
-
getSource
public <TDocument> GetSourceResponse<TDocument> getSource(GetSourceRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Returns the source of a document.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSource
public final <TDocument> GetSourceResponse<TDocument> getSource(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionReturns the source of a document.- Parameters:
fn
- a function that initializes a builder to create theGetSourceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSource
public <TDocument> GetSourceResponse<TDocument> getSource(GetSourceRequest request, Type tDocumentType) throws IOException, ElasticsearchException Returns the source of a document.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSource
public final <TDocument> GetSourceResponse<TDocument> getSource(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionReturns the source of a document.- Parameters:
fn
- a function that initializes a builder to create theGetSourceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
healthReport
public HealthReportResponse healthReport(HealthReportRequest request) throws IOException, ElasticsearchException Returns the health of the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-
healthReport
public final HealthReportResponse healthReport(Function<HealthReportRequest.Builder, ObjectBuilder<HealthReportRequest>> fn) throws IOException, ElasticsearchExceptionReturns the health of the cluster.- Parameters:
fn
- a function that initializes a builder to create theHealthReportRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
healthReport
Returns the health of the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-
index
public <TDocument> IndexResponse index(IndexRequest<TDocument> request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
index
public final <TDocument> IndexResponse index(Function<IndexRequest.Builder<TDocument>, ObjectBuilder<IndexRequest<TDocument>>> fn) throws IOException, ElasticsearchExceptionAdds 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
info
Returns basic information about the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-
knnSearch
public <TDocument> KnnSearchResponse<TDocument> knnSearch(KnnSearchRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Performs a kNN search.- Throws:
IOException
ElasticsearchException
- See Also:
-
knnSearch
public final <TDocument> KnnSearchResponse<TDocument> knnSearch(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionPerforms a kNN search.- Parameters:
fn
- a function that initializes a builder to create theKnnSearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
knnSearch
public <TDocument> KnnSearchResponse<TDocument> knnSearch(KnnSearchRequest request, Type tDocumentType) throws IOException, ElasticsearchException Performs a kNN search.- Throws:
IOException
ElasticsearchException
- See Also:
-
knnSearch
public final <TDocument> KnnSearchResponse<TDocument> knnSearch(Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionPerforms a kNN search.- Parameters:
fn
- a function that initializes a builder to create theKnnSearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
mget
public <TDocument> MgetResponse<TDocument> mget(MgetRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Allows to get multiple documents in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
mget
public final <TDocument> MgetResponse<TDocument> mget(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionAllows to get multiple documents in one request.- Parameters:
fn
- a function that initializes a builder to create theMgetRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
mget
public <TDocument> MgetResponse<TDocument> mget(MgetRequest request, Type tDocumentType) throws IOException, ElasticsearchException Allows to get multiple documents in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
mget
public final <TDocument> MgetResponse<TDocument> mget(Function<MgetRequest.Builder, ObjectBuilder<MgetRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionAllows to get multiple documents in one request.- Parameters:
fn
- a function that initializes a builder to create theMgetRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
msearch
public <TDocument> MsearchResponse<TDocument> msearch(MsearchRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Allows to execute several search operations in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
msearch
public final <TDocument> MsearchResponse<TDocument> msearch(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionAllows to execute several search operations in one request.- Parameters:
fn
- a function that initializes a builder to create theMsearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
msearch
public <TDocument> MsearchResponse<TDocument> msearch(MsearchRequest request, Type tDocumentType) throws IOException, ElasticsearchException Allows to execute several search operations in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
msearch
public final <TDocument> MsearchResponse<TDocument> msearch(Function<MsearchRequest.Builder, ObjectBuilder<MsearchRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionAllows to execute several search operations in one request.- Parameters:
fn
- a function that initializes a builder to create theMsearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
msearchTemplate
public <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(MsearchTemplateRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Runs multiple templated searches with a single request.- Throws:
IOException
ElasticsearchException
- See Also:
-
msearchTemplate
public final <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionRuns multiple templated searches with a single request.- Parameters:
fn
- a function that initializes a builder to create theMsearchTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
msearchTemplate
public <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(MsearchTemplateRequest request, Type tDocumentType) throws IOException, ElasticsearchException Runs multiple templated searches with a single request.- Throws:
IOException
ElasticsearchException
- See Also:
-
msearchTemplate
public final <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(Function<MsearchTemplateRequest.Builder, ObjectBuilder<MsearchTemplateRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionRuns multiple templated searches with a single request.- Parameters:
fn
- a function that initializes a builder to create theMsearchTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
mtermvectors
public MtermvectorsResponse mtermvectors(MtermvectorsRequest request) throws IOException, ElasticsearchException Returns multiple termvectors in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
mtermvectors
public final MtermvectorsResponse mtermvectors(Function<MtermvectorsRequest.Builder, ObjectBuilder<MtermvectorsRequest>> fn) throws IOException, ElasticsearchExceptionReturns multiple termvectors in one request.- Parameters:
fn
- a function that initializes a builder to create theMtermvectorsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
mtermvectors
Returns multiple termvectors in one request.- Throws:
IOException
ElasticsearchException
- See Also:
-
openPointInTime
public OpenPointInTimeResponse openPointInTime(OpenPointInTimeRequest request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
openPointInTime
public final OpenPointInTimeResponse openPointInTime(Function<OpenPointInTimeRequest.Builder, ObjectBuilder<OpenPointInTimeRequest>> fn) throws IOException, ElasticsearchExceptionA 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
ping
Returns whether the cluster is running.- Throws:
IOException
ElasticsearchException
- See Also:
-
putScript
public PutScriptResponse putScript(PutScriptRequest request) throws IOException, ElasticsearchException Creates or updates a stored script or search template.- Throws:
IOException
ElasticsearchException
- See Also:
-
putScript
public final PutScriptResponse putScript(Function<PutScriptRequest.Builder, ObjectBuilder<PutScriptRequest>> fn) throws IOException, ElasticsearchExceptionCreates or updates a stored script or search template.- Parameters:
fn
- a function that initializes a builder to create thePutScriptRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
rankEval
public RankEvalResponse rankEval(RankEvalRequest request) throws IOException, ElasticsearchException Enables you to evaluate the quality of ranked search results over a set of typical search queries.- Throws:
IOException
ElasticsearchException
- See Also:
-
rankEval
public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectBuilder<RankEvalRequest>> fn) throws IOException, ElasticsearchExceptionEnables 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
- Throws:
IOException
ElasticsearchException
- 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
reindex
public final ReindexResponse reindex(Function<ReindexRequest.Builder, ObjectBuilder<ReindexRequest>> fn) throws IOException, ElasticsearchExceptionAllows 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
reindexRethrottle
public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest request) throws IOException, ElasticsearchException Copies documents from a source to a destination.- Throws:
IOException
ElasticsearchException
- See Also:
-
reindexRethrottle
public final ReindexRethrottleResponse reindexRethrottle(Function<ReindexRethrottleRequest.Builder, ObjectBuilder<ReindexRethrottleRequest>> fn) throws IOException, ElasticsearchExceptionCopies documents from a source to a destination.- Parameters:
fn
- a function that initializes a builder to create theReindexRethrottleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
renderSearchTemplate
public RenderSearchTemplateResponse renderSearchTemplate(RenderSearchTemplateRequest request) throws IOException, ElasticsearchException Renders a search template as a search request body.- Throws:
IOException
ElasticsearchException
- See Also:
-
renderSearchTemplate
public final RenderSearchTemplateResponse renderSearchTemplate(Function<RenderSearchTemplateRequest.Builder, ObjectBuilder<RenderSearchTemplateRequest>> fn) throws IOException, ElasticsearchExceptionRenders a search template as a search request body.- Parameters:
fn
- a function that initializes a builder to create theRenderSearchTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
renderSearchTemplate
public RenderSearchTemplateResponse renderSearchTemplate() throws IOException, ElasticsearchExceptionRenders a search template as a search request body.- Throws:
IOException
ElasticsearchException
- See Also:
-
scriptsPainlessExecute
public <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, Class<TResult> tResultClass) throws IOException, ElasticsearchException Runs a script and returns a result.- Throws:
IOException
ElasticsearchException
- See Also:
-
scriptsPainlessExecute
public final <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Class<TResult> tResultClass) throws IOException, ElasticsearchExceptionRuns a script and returns a result.- Parameters:
fn
- a function that initializes a builder to create theScriptsPainlessExecuteRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
scriptsPainlessExecute
public <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, Type tResultType) throws IOException, ElasticsearchException Runs a script and returns a result.- Throws:
IOException
ElasticsearchException
- See Also:
-
scriptsPainlessExecute
public final <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(Function<ScriptsPainlessExecuteRequest.Builder, ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, Type tResultType) throws IOException, ElasticsearchExceptionRuns a script and returns a result.- Parameters:
fn
- a function that initializes a builder to create theScriptsPainlessExecuteRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
scroll
public <TDocument> ScrollResponse<TDocument> scroll(ScrollRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Allows to retrieve a large numbers of results from a single search request.- Throws:
IOException
ElasticsearchException
- See Also:
-
scroll
public final <TDocument> ScrollResponse<TDocument> scroll(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionAllows to retrieve a large numbers of results from a single search request.- Parameters:
fn
- a function that initializes a builder to create theScrollRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
scroll
public <TDocument> ScrollResponse<TDocument> scroll(ScrollRequest request, Type tDocumentType) throws IOException, ElasticsearchException Allows to retrieve a large numbers of results from a single search request.- Throws:
IOException
ElasticsearchException
- See Also:
-
scroll
public final <TDocument> ScrollResponse<TDocument> scroll(Function<ScrollRequest.Builder, ObjectBuilder<ScrollRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionAllows to retrieve a large numbers of results from a single search request.- Parameters:
fn
- a function that initializes a builder to create theScrollRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
search
public <TDocument> SearchResponse<TDocument> search(SearchRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
search
public final <TDocument> SearchResponse<TDocument> search(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionReturns 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
search
public <TDocument> SearchResponse<TDocument> search(SearchRequest request, Type tDocumentType) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
search
public final <TDocument> SearchResponse<TDocument> search(Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionReturns 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
searchMvt
public BinaryResponse searchMvt(SearchMvtRequest request) throws IOException, ElasticsearchException Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.- Throws:
IOException
ElasticsearchException
- See Also:
-
searchMvt
public final BinaryResponse searchMvt(Function<SearchMvtRequest.Builder, ObjectBuilder<SearchMvtRequest>> fn) throws IOException, ElasticsearchExceptionSearches 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
searchShards
public SearchShardsResponse searchShards(SearchShardsRequest request) throws IOException, ElasticsearchException Returns information about the indices and shards that a search request would be executed against.- Throws:
IOException
ElasticsearchException
- See Also:
-
searchShards
public final SearchShardsResponse searchShards(Function<SearchShardsRequest.Builder, ObjectBuilder<SearchShardsRequest>> fn) throws IOException, ElasticsearchExceptionReturns 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
searchShards
Returns information about the indices and shards that a search request would be executed against.- Throws:
IOException
ElasticsearchException
- See Also:
-
searchTemplate
public <TDocument> SearchTemplateResponse<TDocument> searchTemplate(SearchTemplateRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Runs a search with a search template.- Throws:
IOException
ElasticsearchException
- See Also:
-
searchTemplate
public final <TDocument> SearchTemplateResponse<TDocument> searchTemplate(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionRuns a search with a search template.- Parameters:
fn
- a function that initializes a builder to create theSearchTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
searchTemplate
public <TDocument> SearchTemplateResponse<TDocument> searchTemplate(SearchTemplateRequest request, Type tDocumentType) throws IOException, ElasticsearchException Runs a search with a search template.- Throws:
IOException
ElasticsearchException
- See Also:
-
searchTemplate
public final <TDocument> SearchTemplateResponse<TDocument> searchTemplate(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionRuns a search with a search template.- Parameters:
fn
- a function that initializes a builder to create theSearchTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
termsEnum
public TermsEnumResponse termsEnum(TermsEnumRequest request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
termsEnum
public final TermsEnumResponse termsEnum(Function<TermsEnumRequest.Builder, ObjectBuilder<TermsEnumRequest>> fn) throws IOException, ElasticsearchExceptionThe 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
termvectors
public <TDocument> TermvectorsResponse termvectors(TermvectorsRequest<TDocument> request) throws IOException, ElasticsearchException Returns information and statistics about terms in the fields of a particular document.- Throws:
IOException
ElasticsearchException
- See Also:
-
termvectors
public final <TDocument> TermvectorsResponse termvectors(Function<TermvectorsRequest.Builder<TDocument>, ObjectBuilder<TermvectorsRequest<TDocument>>> fn) throws IOException, ElasticsearchExceptionReturns information and statistics about terms in the fields of a particular document.- Parameters:
fn
- a function that initializes a builder to create theTermvectorsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
update
public <TDocument,TPartialDocument> UpdateResponse<TDocument> update(UpdateRequest<TDocument, TPartialDocument> request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionUpdates a document with a script or partial document.- Throws:
IOException
ElasticsearchException
- See Also:
-
update
public final <TDocument,TPartialDocument> UpdateResponse<TDocument> update(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, throws IOException, ElasticsearchExceptionObjectBuilder<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
- Throws:
IOException
ElasticsearchException
- See Also:
-
update
public <TDocument,TPartialDocument> UpdateResponse<TDocument> update(UpdateRequest<TDocument, TPartialDocument> request, Type tDocumentType) throws IOException, ElasticsearchExceptionUpdates a document with a script or partial document.- Throws:
IOException
ElasticsearchException
- See Also:
-
update
public final <TDocument,TPartialDocument> UpdateResponse<TDocument> update(Function<UpdateRequest.Builder<TDocument, TPartialDocument>, throws IOException, ElasticsearchExceptionObjectBuilder<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
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateByQuery
public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) throws IOException, ElasticsearchException 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateByQuery
public final UpdateByQueryResponse updateByQuery(Function<UpdateByQueryRequest.Builder, ObjectBuilder<UpdateByQueryRequest>> fn) throws IOException, ElasticsearchExceptionUpdates 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateByQueryRethrottle
public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) throws IOException, ElasticsearchException Changes the number of requests per second for a particular Update By Query operation.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateByQueryRethrottle
public final UpdateByQueryRethrottleResponse updateByQueryRethrottle(Function<UpdateByQueryRethrottleRequest.Builder, ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) throws IOException, ElasticsearchExceptionChanges the number of requests per second for a particular Update By Query operation.- Parameters:
fn
- a function that initializes a builder to create theUpdateByQueryRethrottleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-