Package co.elastic.clients.elasticsearch
Class ElasticsearchClient
java.lang.Object
co.elastic.clients.base.ApiClient
co.elastic.clients.elasticsearch.ElasticsearchClient
public class ElasticsearchClient extends ApiClient
Client for the namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ElasticsearchClient(Transport transport)
-
Method Summary
Modifier and Type Method Description ElasticsearchAsyncSearchClient
asyncSearch()
ElasticsearchAutoscalingClient
autoscaling()
<TSource> BulkResponse
bulk(BulkRequest<TSource> request)
Allows to perform multiple index/update/delete operations in a single request.<TSource> BulkResponse
bulk(java.util.function.Function<BulkRequest.Builder<TSource>,ObjectBuilder<BulkRequest<TSource>>> fn)
Allows to perform multiple index/update/delete operations in a single request.ElasticsearchCatClient
cat()
ElasticsearchCcrClient
ccr()
ClearScrollResponse
clearScroll(ClearScrollRequest request)
Explicitly clears the search context for a scroll.ClearScrollResponse
clearScroll(java.util.function.Function<ClearScrollRequest.Builder,ObjectBuilder<ClearScrollRequest>> fn)
Explicitly clears the search context for a scroll.ClosePointInTimeResponse
closePointInTime(ClosePointInTimeRequest request)
Close a point in timeClosePointInTimeResponse
closePointInTime(java.util.function.Function<ClosePointInTimeRequest.Builder,ObjectBuilder<ClosePointInTimeRequest>> fn)
Close a point in timeElasticsearchClusterClient
cluster()
CountResponse
count(CountRequest request)
Returns number of documents matching a query.CountResponse
count(java.util.function.Function<CountRequest.Builder,ObjectBuilder<CountRequest>> fn)
Returns number of documents matching a query.<TDocument>
CreateResponsecreate(CreateRequest<TDocument> request)
Creates a new document in the index.<TDocument>
CreateResponsecreate(java.util.function.Function<CreateRequest.Builder<TDocument>,ObjectBuilder<CreateRequest<TDocument>>> fn)
Creates a new document in the index.ElasticsearchDanglingIndicesClient
danglingIndices()
DeleteResponse
delete(DeleteRequest request)
Removes a document from the index.DeleteResponse
delete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn)
Removes a document from the index.DeleteByQueryResponse
deleteByQuery(DeleteByQueryRequest request)
Deletes documents matching the provided query.DeleteByQueryResponse
deleteByQuery(java.util.function.Function<DeleteByQueryRequest.Builder,ObjectBuilder<DeleteByQueryRequest>> fn)
Deletes documents matching the provided query.DeleteByQueryRethrottleResponse
deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request)
Changes the number of requests per second for a particular Delete By Query operation.DeleteByQueryRethrottleResponse
deleteByQueryRethrottle(java.util.function.Function<DeleteByQueryRethrottleRequest.Builder,ObjectBuilder<DeleteByQueryRethrottleRequest>> fn)
Changes the number of requests per second for a particular Delete By Query operation.DeleteScriptResponse
deleteScript(DeleteScriptRequest request)
Deletes a script.DeleteScriptResponse
deleteScript(java.util.function.Function<DeleteScriptRequest.Builder,ObjectBuilder<DeleteScriptRequest>> fn)
Deletes a script.ElasticsearchEnrichClient
enrich()
ElasticsearchEqlClient
eql()
BooleanResponse
exists(ExistsRequest request)
Returns information about whether a document exists in an index.BooleanResponse
exists(java.util.function.Function<ExistsRequest.Builder,ObjectBuilder<ExistsRequest>> fn)
Returns information about whether a document exists in an index.BooleanResponse
existsSource(ExistsSourceRequest request)
Returns information about whether a document source exists in an index.BooleanResponse
existsSource(java.util.function.Function<ExistsSourceRequest.Builder,ObjectBuilder<ExistsSourceRequest>> fn)
Returns information about whether a document source exists in an index.<TDocument>
ExplainResponse<TDocument>explain(ExplainRequest request, java.lang.Class<TDocument> tDocumentClass)
Returns information about why a specific matches (or doesn't match) a query.<TDocument>
ExplainResponse<TDocument>explain(java.util.function.Function<ExplainRequest.Builder,ObjectBuilder<ExplainRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Returns information about why a specific matches (or doesn't match) a query.ElasticsearchFeaturesClient
features()
FieldCapsResponse
fieldCaps(FieldCapsRequest request)
Returns the information about the capabilities of fields among multiple indices.FieldCapsResponse
fieldCaps(java.util.function.Function<FieldCapsRequest.Builder,ObjectBuilder<FieldCapsRequest>> fn)
Returns the information about the capabilities of fields among multiple indices.<TDocument>
GetResponse<TDocument>get(GetRequest request, java.lang.Class<TDocument> tDocumentClass)
Returns a document.<TDocument>
GetResponse<TDocument>get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Returns a document.GetScriptResponse
getScript(GetScriptRequest request)
Returns a script.GetScriptResponse
getScript(java.util.function.Function<GetScriptRequest.Builder,ObjectBuilder<GetScriptRequest>> fn)
Returns a script.GetScriptContextResponse
getScriptContext()
Returns all script contexts.GetScriptLanguagesResponse
getScriptLanguages()
Returns available script types, languages and contexts<TDocument>
GetSourceResponse<TDocument>getSource(GetSourceRequest request, java.lang.Class<TDocument> tDocumentClass)
Returns the source of a document.<TDocument>
GetSourceResponse<TDocument>getSource(java.util.function.Function<GetSourceRequest.Builder,ObjectBuilder<GetSourceRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Returns the source of a document.ElasticsearchGraphClient
graph()
ElasticsearchIlmClient
ilm()
<TDocument>
IndexResponseindex(IndexRequest<TDocument> request)
Creates or updates a document in an index.<TDocument>
IndexResponseindex(java.util.function.Function<IndexRequest.Builder<TDocument>,ObjectBuilder<IndexRequest<TDocument>>> fn)
Creates or updates a document in an index.ElasticsearchIndicesClient
indices()
InfoResponse
info()
Returns basic information about the cluster.ElasticsearchIngestClient
ingest()
ElasticsearchLicenseClient
license()
ElasticsearchLogstashClient
logstash()
<TDocument>
MgetResponse<TDocument>mget(MgetRequest request, java.lang.Class<TDocument> tDocumentClass)
Allows to get multiple documents in one request.<TDocument>
MgetResponse<TDocument>mget(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Allows to get multiple documents in one request.ElasticsearchMigrationClient
migration()
ElasticsearchMlClient
ml()
ElasticsearchMonitoringClient
monitoring()
<TDocument>
MsearchResponse<TDocument>msearch(MsearchRequest request, java.lang.Class<TDocument> tDocumentClass)
Allows to execute several search operations in one request.<TDocument>
MsearchResponse<TDocument>msearch(java.util.function.Function<MsearchRequest.Builder,ObjectBuilder<MsearchRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Allows to execute several search operations in one request.<TDocument>
MsearchTemplateResponse<TDocument>msearchTemplate(MsearchTemplateRequest request, java.lang.Class<TDocument> tDocumentClass)
Allows to execute several search template operations in one request.<TDocument>
MsearchTemplateResponse<TDocument>msearchTemplate(java.util.function.Function<MsearchTemplateRequest.Builder,ObjectBuilder<MsearchTemplateRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Allows to execute several search template operations in one request.MtermvectorsResponse
mtermvectors(MtermvectorsRequest request)
Returns multiple termvectors in one request.MtermvectorsResponse
mtermvectors(java.util.function.Function<MtermvectorsRequest.Builder,ObjectBuilder<MtermvectorsRequest>> fn)
Returns multiple termvectors in one request.ElasticsearchNodesClient
nodes()
OpenPointInTimeResponse
openPointInTime(OpenPointInTimeRequest request)
Open a point in time that can be used in subsequent searchesOpenPointInTimeResponse
openPointInTime(java.util.function.Function<OpenPointInTimeRequest.Builder,ObjectBuilder<OpenPointInTimeRequest>> fn)
Open a point in time that can be used in subsequent searchesBooleanResponse
ping()
Returns whether the cluster is running.PutScriptResponse
putScript(PutScriptRequest request)
Creates or updates a script.PutScriptResponse
putScript(java.util.function.Function<PutScriptRequest.Builder,ObjectBuilder<PutScriptRequest>> fn)
Creates or updates a script.RankEvalResponse
rankEval(RankEvalRequest request)
Allows to evaluate the quality of ranked search results over a set of typical search queriesRankEvalResponse
rankEval(java.util.function.Function<RankEvalRequest.Builder,ObjectBuilder<RankEvalRequest>> fn)
Allows to evaluate the quality of ranked search results over a set of typical search queriesReindexResponse
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.ReindexResponse
reindex(java.util.function.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.ReindexRethrottleResponse
reindexRethrottle(ReindexRethrottleRequest request)
Changes the number of requests per second for a particular Reindex operation.ReindexRethrottleResponse
reindexRethrottle(java.util.function.Function<ReindexRethrottleRequest.Builder,ObjectBuilder<ReindexRethrottleRequest>> fn)
Changes the number of requests per second for a particular Reindex operation.ElasticsearchRollupClient
rollup()
<TResult> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, java.lang.Class<TResult> tResultClass)
Allows an arbitrary script to be executed and a result to be returned<TResult> ScriptsPainlessExecuteResponse<TResult>
scriptsPainlessExecute(java.util.function.Function<ScriptsPainlessExecuteRequest.Builder,ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, java.lang.Class<TResult> tResultClass)
Allows an arbitrary script to be executed and a result to be returned<TDocument>
SearchResponse<TDocument>search(SearchRequest request, java.lang.Class<TDocument> tDocumentClass)
Returns results matching a query.<TDocument>
SearchResponse<TDocument>search(java.util.function.Function<SearchRequest.Builder,ObjectBuilder<SearchRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Returns results matching a query.ElasticsearchSearchableSnapshotsClient
searchableSnapshots()
SearchMvtResponse
searchMvt(SearchMvtRequest request)
Searches a vector tile for geospatial values.SearchMvtResponse
searchMvt(java.util.function.Function<SearchMvtRequest.Builder,ObjectBuilder<SearchMvtRequest>> fn)
Searches a vector tile for geospatial values.SearchShardsResponse
searchShards(SearchShardsRequest request)
Returns information about the indices and shards that a search request would be executed against.SearchShardsResponse
searchShards(java.util.function.Function<SearchShardsRequest.Builder,ObjectBuilder<SearchShardsRequest>> fn)
Returns information about the indices and shards that a search request would be executed against.<TDocument>
SearchTemplateResponse<TDocument>searchTemplate(SearchTemplateRequest request, java.lang.Class<TDocument> tDocumentClass)
Allows to use the Mustache language to pre-render a search definition.<TDocument>
SearchTemplateResponse<TDocument>searchTemplate(java.util.function.Function<SearchTemplateRequest.Builder,ObjectBuilder<SearchTemplateRequest>> fn, java.lang.Class<TDocument> tDocumentClass)
Allows to use the Mustache language to pre-render a search definition.ElasticsearchSecurityClient
security()
ElasticsearchShutdownClient
shutdown()
ElasticsearchSlmClient
slm()
ElasticsearchSnapshotClient
snapshot()
ElasticsearchSqlClient
sql()
ElasticsearchSslClient
ssl()
ElasticsearchTasksClient
tasks()
TermsEnumResponse
termsEnum(TermsEnumRequest request)
The terms enum API can be used to discover terms in the index that begin with the provided string.TermsEnumResponse
termsEnum(java.util.function.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.<TDocument>
TermvectorsResponsetermvectors(TermvectorsRequest<TDocument> request)
Returns information and statistics about terms in the fields of a particular document.<TDocument>
TermvectorsResponsetermvectors(java.util.function.Function<TermvectorsRequest.Builder<TDocument>,ObjectBuilder<TermvectorsRequest<TDocument>>> fn)
Returns information and statistics about terms in the fields of a particular document.ElasticsearchTextStructureClient
textStructure()
ElasticsearchTransformClient
transform()
<TDocument, TPartialDocument>
UpdateResponse<TDocument>update(UpdateRequest<TDocument,TPartialDocument> request, java.lang.Class<TDocument> tDocumentClass)
Updates a document with a script or partial document.<TDocument, TPartialDocument>
UpdateResponse<TDocument>update(java.util.function.Function<UpdateRequest.Builder<TDocument,TPartialDocument>,ObjectBuilder<UpdateRequest<TDocument,TPartialDocument>>> fn, java.lang.Class<TDocument> tDocumentClass)
Updates a document with a script or partial document.UpdateByQueryResponse
updateByQuery(UpdateByQueryRequest request)
Performs an update on every document in the index without changing the source, for example to pick up a mapping change.UpdateByQueryResponse
updateByQuery(java.util.function.Function<UpdateByQueryRequest.Builder,ObjectBuilder<UpdateByQueryRequest>> fn)
Performs an update on every document in the index without changing the source, for example to pick up a mapping change.UpdateByQueryRethrottleResponse
updateByQueryRethrottle(UpdateByQueryRethrottleRequest request)
Changes the number of requests per second for a particular Update By Query operation.UpdateByQueryRethrottleResponse
updateByQueryRethrottle(java.util.function.Function<UpdateByQueryRethrottleRequest.Builder,ObjectBuilder<UpdateByQueryRethrottleRequest>> fn)
Changes the number of requests per second for a particular Update By Query operation.ElasticsearchWatcherClient
watcher()
ElasticsearchXpackClient
xpack()
Methods inherited from class co.elastic.clients.base.ApiClient
_transport, getDeserializer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ElasticsearchClient
-
-
Method Details
-
asyncSearch
-
autoscaling
-
cat
-
ccr
-
cluster
-
danglingIndices
-
enrich
-
eql
-
features
-
graph
-
ilm
-
indices
-
ingest
-
license
-
logstash
-
migration
-
ml
-
monitoring
-
nodes
-
rollup
-
searchableSnapshots
-
security
-
shutdown
-
slm
-
snapshot
-
sql
-
ssl
-
tasks
-
textStructure
-
transform
-
watcher
-
xpack
-
bulk
Allows to perform multiple index/update/delete operations in a single request.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
bulk
public final <TSource> BulkResponse bulk(java.util.function.Function<BulkRequest.Builder<TSource>,ObjectBuilder<BulkRequest<TSource>>> fn) throws java.io.IOExceptionAllows to perform multiple index/update/delete operations in a single request.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
clearScroll
Explicitly clears the search context for a scroll.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
clearScroll
public final ClearScrollResponse clearScroll(java.util.function.Function<ClearScrollRequest.Builder,ObjectBuilder<ClearScrollRequest>> fn) throws java.io.IOExceptionExplicitly clears the search context for a scroll.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
closePointInTime
public ClosePointInTimeResponse closePointInTime(ClosePointInTimeRequest request) throws java.io.IOExceptionClose a point in time- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
closePointInTime
public final ClosePointInTimeResponse closePointInTime(java.util.function.Function<ClosePointInTimeRequest.Builder,ObjectBuilder<ClosePointInTimeRequest>> fn) throws java.io.IOExceptionClose a point in time- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
count
Returns number of documents matching a query.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
count
public final CountResponse count(java.util.function.Function<CountRequest.Builder,ObjectBuilder<CountRequest>> fn) throws java.io.IOExceptionReturns number of documents matching a query.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
create
public <TDocument> CreateResponse create(CreateRequest<TDocument> request) throws java.io.IOExceptionCreates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index.
- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
create
public final <TDocument> CreateResponse create(java.util.function.Function<CreateRequest.Builder<TDocument>,ObjectBuilder<CreateRequest<TDocument>>> fn) throws java.io.IOExceptionCreates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index.
- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
delete
Removes a document from the index.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
delete
public final DeleteResponse delete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn) throws java.io.IOExceptionRemoves a document from the index.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteByQuery
public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) throws java.io.IOExceptionDeletes documents matching the provided query.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteByQuery
public final DeleteByQueryResponse deleteByQuery(java.util.function.Function<DeleteByQueryRequest.Builder,ObjectBuilder<DeleteByQueryRequest>> fn) throws java.io.IOExceptionDeletes documents matching the provided query.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteByQueryRethrottle
public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) throws java.io.IOExceptionChanges the number of requests per second for a particular Delete By Query operation.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteByQueryRethrottle
public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle(java.util.function.Function<DeleteByQueryRethrottleRequest.Builder,ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) throws java.io.IOExceptionChanges the number of requests per second for a particular Delete By Query operation.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteScript
Deletes a script.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
deleteScript
public final DeleteScriptResponse deleteScript(java.util.function.Function<DeleteScriptRequest.Builder,ObjectBuilder<DeleteScriptRequest>> fn) throws java.io.IOExceptionDeletes a script.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
exists
Returns information about whether a document exists in an index.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
exists
public final BooleanResponse exists(java.util.function.Function<ExistsRequest.Builder,ObjectBuilder<ExistsRequest>> fn) throws java.io.IOExceptionReturns information about whether a document exists in an index.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
existsSource
Returns information about whether a document source exists in an index.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
existsSource
public final BooleanResponse existsSource(java.util.function.Function<ExistsSourceRequest.Builder,ObjectBuilder<ExistsSourceRequest>> fn) throws java.io.IOExceptionReturns information about whether a document source exists in an index.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
explain
public <TDocument> ExplainResponse<TDocument> explain(ExplainRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns information about why a specific matches (or doesn't match) a query.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
explain
public final <TDocument> ExplainResponse<TDocument> explain(java.util.function.Function<ExplainRequest.Builder,ObjectBuilder<ExplainRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns information about why a specific matches (or doesn't match) a query.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
fieldCaps
Returns the information about the capabilities of fields among multiple indices.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
fieldCaps
public final FieldCapsResponse fieldCaps(java.util.function.Function<FieldCapsRequest.Builder,ObjectBuilder<FieldCapsRequest>> fn) throws java.io.IOExceptionReturns the information about the capabilities of fields among multiple indices.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
get
public <TDocument> GetResponse<TDocument> get(GetRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns a document.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
get
public final <TDocument> GetResponse<TDocument> get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns a document.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getScript
Returns a script.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getScript
public final GetScriptResponse getScript(java.util.function.Function<GetScriptRequest.Builder,ObjectBuilder<GetScriptRequest>> fn) throws java.io.IOExceptionReturns a script.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getScriptContext
Returns all script contexts.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getScriptLanguages
Returns available script types, languages and contexts- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getSource
public <TDocument> GetSourceResponse<TDocument> getSource(GetSourceRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns the source of a document.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
getSource
public final <TDocument> GetSourceResponse<TDocument> getSource(java.util.function.Function<GetSourceRequest.Builder,ObjectBuilder<GetSourceRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns the source of a document.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
index
Creates or updates a document in an index.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
index
public final <TDocument> IndexResponse index(java.util.function.Function<IndexRequest.Builder<TDocument>,ObjectBuilder<IndexRequest<TDocument>>> fn) throws java.io.IOExceptionCreates or updates a document in an index.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
info
Returns basic information about the cluster.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
mget
public <TDocument> MgetResponse<TDocument> mget(MgetRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to get multiple documents in one request.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
mget
public final <TDocument> MgetResponse<TDocument> mget(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to get multiple documents in one request.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
msearch
public <TDocument> MsearchResponse<TDocument> msearch(MsearchRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to execute several search operations in one request.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
msearch
public final <TDocument> MsearchResponse<TDocument> msearch(java.util.function.Function<MsearchRequest.Builder,ObjectBuilder<MsearchRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to execute several search operations in one request.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
msearchTemplate
public <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(MsearchTemplateRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to execute several search template operations in one request.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
msearchTemplate
public final <TDocument> MsearchTemplateResponse<TDocument> msearchTemplate(java.util.function.Function<MsearchTemplateRequest.Builder,ObjectBuilder<MsearchTemplateRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to execute several search template operations in one request.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
mtermvectors
Returns multiple termvectors in one request.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
mtermvectors
public final MtermvectorsResponse mtermvectors(java.util.function.Function<MtermvectorsRequest.Builder,ObjectBuilder<MtermvectorsRequest>> fn) throws java.io.IOExceptionReturns multiple termvectors in one request.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
openPointInTime
public OpenPointInTimeResponse openPointInTime(OpenPointInTimeRequest request) throws java.io.IOExceptionOpen a point in time that can be used in subsequent searches- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
openPointInTime
public final OpenPointInTimeResponse openPointInTime(java.util.function.Function<OpenPointInTimeRequest.Builder,ObjectBuilder<OpenPointInTimeRequest>> fn) throws java.io.IOExceptionOpen a point in time that can be used in subsequent searches- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
ping
Returns whether the cluster is running.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
putScript
Creates or updates a script.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
putScript
public final PutScriptResponse putScript(java.util.function.Function<PutScriptRequest.Builder,ObjectBuilder<PutScriptRequest>> fn) throws java.io.IOExceptionCreates or updates a script.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
rankEval
Allows to evaluate the quality of ranked search results over a set of typical search queries- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
rankEval
public final RankEvalResponse rankEval(java.util.function.Function<RankEvalRequest.Builder,ObjectBuilder<RankEvalRequest>> fn) throws java.io.IOExceptionAllows to evaluate the quality of ranked search results over a set of typical search queries- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
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:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
reindex
public final ReindexResponse reindex(java.util.function.Function<ReindexRequest.Builder,ObjectBuilder<ReindexRequest>> fn) throws java.io.IOExceptionAllows 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 freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
reindexRethrottle
public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest request) throws java.io.IOExceptionChanges the number of requests per second for a particular Reindex operation.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
reindexRethrottle
public final ReindexRethrottleResponse reindexRethrottle(java.util.function.Function<ReindexRethrottleRequest.Builder,ObjectBuilder<ReindexRethrottleRequest>> fn) throws java.io.IOExceptionChanges the number of requests per second for a particular Reindex operation.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
scriptsPainlessExecute
public <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(ScriptsPainlessExecuteRequest request, java.lang.Class<TResult> tResultClass) throws java.io.IOExceptionAllows an arbitrary script to be executed and a result to be returned- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
scriptsPainlessExecute
public final <TResult> ScriptsPainlessExecuteResponse<TResult> scriptsPainlessExecute(java.util.function.Function<ScriptsPainlessExecuteRequest.Builder,ObjectBuilder<ScriptsPainlessExecuteRequest>> fn, java.lang.Class<TResult> tResultClass) throws java.io.IOExceptionAllows an arbitrary script to be executed and a result to be returned- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
search
public <TDocument> SearchResponse<TDocument> search(SearchRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns results matching a query.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
search
public final <TDocument> SearchResponse<TDocument> search(java.util.function.Function<SearchRequest.Builder,ObjectBuilder<SearchRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionReturns results matching a query.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchMvt
Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchMvt
public final SearchMvtResponse searchMvt(java.util.function.Function<SearchMvtRequest.Builder,ObjectBuilder<SearchMvtRequest>> fn) throws java.io.IOExceptionSearches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchShards
Returns information about the indices and shards that a search request would be executed against.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchShards
public final SearchShardsResponse searchShards(java.util.function.Function<SearchShardsRequest.Builder,ObjectBuilder<SearchShardsRequest>> fn) throws java.io.IOExceptionReturns information about the indices and shards that a search request would be executed against.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchTemplate
public <TDocument> SearchTemplateResponse<TDocument> searchTemplate(SearchTemplateRequest request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to use the Mustache language to pre-render a search definition.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
searchTemplate
public final <TDocument> SearchTemplateResponse<TDocument> searchTemplate(java.util.function.Function<SearchTemplateRequest.Builder,ObjectBuilder<SearchTemplateRequest>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionAllows to use the Mustache language to pre-render a search definition.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
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.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
termsEnum
public final TermsEnumResponse termsEnum(java.util.function.Function<TermsEnumRequest.Builder,ObjectBuilder<TermsEnumRequest>> fn) throws java.io.IOExceptionThe 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 freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
termvectors
public <TDocument> TermvectorsResponse termvectors(TermvectorsRequest<TDocument> request) throws java.io.IOExceptionReturns information and statistics about terms in the fields of a particular document.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
termvectors
public final <TDocument> TermvectorsResponse termvectors(java.util.function.Function<TermvectorsRequest.Builder<TDocument>,ObjectBuilder<TermvectorsRequest<TDocument>>> fn) throws java.io.IOExceptionReturns information and statistics about terms in the fields of a particular document.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
update
public <TDocument, TPartialDocument> UpdateResponse<TDocument> update(UpdateRequest<TDocument,TPartialDocument> request, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionUpdates a document with a script or partial document.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
update
public final <TDocument, TPartialDocument> UpdateResponse<TDocument> update(java.util.function.Function<UpdateRequest.Builder<TDocument,TPartialDocument>,ObjectBuilder<UpdateRequest<TDocument,TPartialDocument>>> fn, java.lang.Class<TDocument> tDocumentClass) throws java.io.IOExceptionUpdates a document with a script or partial document.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
updateByQuery
public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) throws java.io.IOExceptionPerforms an update on every document in the index without changing the source, for example to pick up a mapping change.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
updateByQuery
public final UpdateByQueryResponse updateByQuery(java.util.function.Function<UpdateByQueryRequest.Builder,ObjectBuilder<UpdateByQueryRequest>> fn) throws java.io.IOExceptionPerforms an update on every document in the index without changing the source, for example to pick up a mapping change.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
updateByQueryRethrottle
public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) throws java.io.IOExceptionChanges the number of requests per second for a particular Update By Query operation.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-
updateByQueryRethrottle
public final UpdateByQueryRethrottleResponse updateByQueryRethrottle(java.util.function.Function<UpdateByQueryRethrottleRequest.Builder,ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) throws java.io.IOExceptionChanges the number of requests per second for a particular Update By Query operation.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
- See Also:
- Documentation on elastic.co
-