Package org.opensearch.client.opensearch
Class OpenSearchClientBase<Self extends OpenSearchClientBase<Self>>
java.lang.Object
org.opensearch.client.ApiClient<OpenSearchTransport,Self>
org.opensearch.client.opensearch.OpenSearchClientBase<Self>
- Direct Known Subclasses:
OpenSearchClient
@Generated("org.opensearch.client.codegen.CodeGenerator")
public abstract class OpenSearchClientBase<Self extends OpenSearchClientBase<Self>>
extends ApiClient<OpenSearchTransport,Self>
Client for the namespace.
-
Field Summary
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchClientBase(OpenSearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptioncat()final ClearScrollResponseExplicitly clears the search context for a scroll.final ClearScrollResponseExplicitly clears the search context for a scroll.clearScroll(ClearScrollRequest request) Explicitly clears the search context for a scroll.cluster()final CountResponsecount()Returns number of documents matching a query.final CountResponseReturns number of documents matching a query.count(CountRequest request) Returns number of documents matching a query.final CreatePitResponseCreates point in time context.createPit(CreatePitRequest request) Creates point in time context.final DeleteResponseRemoves a document from the index.delete(DeleteRequest request) Removes a document from the index.final DeleteAllPitsResponseDeletes all active point in time searches.final DeleteAllPitsResponseDeletes all active point in time searches.deleteAllPits(DeleteAllPitsRequest request) Deletes all active point in time searches.final DeleteByQueryResponseDeletes documents matching the provided query.deleteByQuery(DeleteByQueryRequest request) Deletes documents matching the provided query.deleteByQueryRethrottle(Function<DeleteByQueryRethrottleRequest.Builder, ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Delete By Query operation.Changes the number of requests per second for a particular Delete By Query operation.final DeletePitResponseDeletes one or more point in time searches based on the IDs passed.deletePit(DeletePitRequest request) Deletes one or more point in time searches based on the IDs passed.final DeleteScriptResponseDeletes a script.deleteScript(DeleteScriptRequest request) Deletes a script.final BooleanResponseReturns information about whether a document exists in an index.exists(ExistsRequest request) Returns information about whether a document exists in an index.final BooleanResponseReturns information about whether a document source exists in an index.existsSource(ExistsSourceRequest request) Returns information about whether a document source exists in an index.final FieldCapsResponseReturns the information about the capabilities of fields among multiple indexes.final FieldCapsResponseReturns the information about the capabilities of fields among multiple indexes.fieldCaps(FieldCapsRequest request) Returns the information about the capabilities of fields among multiple indexes.final GetAllPitsResponseLists all active point in time searches.final GetAllPitsResponseLists all active point in time searches.getAllPits(GetAllPitsRequest request) Lists all active point in time searches.final GetScriptResponseReturns a script.getScript(GetScriptRequest request) Returns a script.final GetScriptContextResponseReturns all script contexts.final GetScriptContextResponsegetScriptContext(Function<GetScriptContextRequest.Builder, ObjectBuilder<GetScriptContextRequest>> fn) Returns all script contexts.getScriptContext(GetScriptContextRequest request) Returns all script contexts.Returns available script types, languages and contexts.getScriptLanguages(Function<GetScriptLanguagesRequest.Builder, ObjectBuilder<GetScriptLanguagesRequest>> fn) Returns available script types, languages and contexts.Returns available script types, languages and contexts.indices()final InfoResponseinfo()Returns basic information about the cluster.final InfoResponseReturns basic information about the cluster.info(InfoRequest request) Returns basic information about the cluster.ingest()ml()final MtermvectorsResponseReturns multiple termvectors in one request.final MtermvectorsResponseReturns multiple termvectors in one request.mtermvectors(MtermvectorsRequest request) Returns multiple termvectors in one request.nodes()final BooleanResponseping()Returns whether the cluster is running.final BooleanResponseReturns whether the cluster is running.ping(PingRequest request) Returns whether the cluster is running.final PutScriptResponseCreates or updates a script.putScript(PutScriptRequest request) Creates or updates a script.final RankEvalResponseAllows to evaluate the quality of ranked search results over a set of typical search queries.rankEval(RankEvalRequest request) Allows to evaluate the quality of ranked search results over a set of typical search queries.final ReindexResponseAllows 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.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.reindexRethrottle(Function<ReindexRethrottleRequest.Builder, ObjectBuilder<ReindexRethrottleRequest>> fn) Changes the number of requests per second for a particular reindex operation.Changes the number of requests per second for a particular reindex operation.Allows to use the Mustache language to pre-render a search definition.renderSearchTemplate(Function<RenderSearchTemplateRequest.Builder, ObjectBuilder<RenderSearchTemplateRequest>> fn) Allows to use the Mustache language to pre-render a search definition.Allows to use the Mustache language to pre-render a search definition.final SearchShardsResponseReturns information about the indexes and shards that a search request would be executed against.final SearchShardsResponseReturns information about the indexes and shards that a search request would be executed against.searchShards(SearchShardsRequest request) Returns information about the indexes and shards that a search request would be executed against.snapshot()tasks()final UpdateByQueryResponsePerforms an update on every document in the index without changing the source, for example to pick up a mapping change.updateByQuery(UpdateByQueryRequest request) Performs an update on every document in the index without changing the source, for example to pick up a mapping change.updateByQueryRethrottle(Function<UpdateByQueryRethrottleRequest.Builder, ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) Changes the number of requests per second for a particular Update By Query operation.Changes the number of requests per second for a particular Update By Query operation.Methods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer, withTransportOptions
-
Constructor Details
-
OpenSearchClientBase
public OpenSearchClientBase(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
cat
-
cluster
-
danglingIndices
-
indices
-
ingest
-
ml
-
nodes
-
searchPipeline
-
snapshot
-
tasks
-
clearScroll
public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOException, OpenSearchException Explicitly clears the search context for a scroll.- Throws:
IOExceptionOpenSearchException
-
clearScroll
public final ClearScrollResponse clearScroll(Function<ClearScrollRequest.Builder, ObjectBuilder<ClearScrollRequest>> fn) throws IOException, OpenSearchExceptionExplicitly clears the search context for a scroll.- Parameters:
fn- a function that initializes a builder to create theClearScrollRequest- Throws:
IOExceptionOpenSearchException
-
clearScroll
Explicitly clears the search context for a scroll.- Throws:
IOExceptionOpenSearchException
-
count
Returns number of documents matching a query.- Throws:
IOExceptionOpenSearchException
-
count
public final CountResponse count(Function<CountRequest.Builder, ObjectBuilder<CountRequest>> fn) throws IOException, OpenSearchExceptionReturns number of documents matching a query.- Parameters:
fn- a function that initializes a builder to create theCountRequest- Throws:
IOExceptionOpenSearchException
-
count
Returns number of documents matching a query.- Throws:
IOExceptionOpenSearchException
-
createPit
public CreatePitResponse createPit(CreatePitRequest request) throws IOException, OpenSearchException Creates point in time context.- Throws:
IOExceptionOpenSearchException
-
createPit
public final CreatePitResponse createPit(Function<CreatePitRequest.Builder, ObjectBuilder<CreatePitRequest>> fn) throws IOException, OpenSearchExceptionCreates point in time context.- Parameters:
fn- a function that initializes a builder to create theCreatePitRequest- Throws:
IOExceptionOpenSearchException
-
delete
Removes a document from the index.- Throws:
IOExceptionOpenSearchException
-
delete
public final DeleteResponse delete(Function<DeleteRequest.Builder, ObjectBuilder<DeleteRequest>> fn) throws IOException, OpenSearchExceptionRemoves a document from the index.- Parameters:
fn- a function that initializes a builder to create theDeleteRequest- Throws:
IOExceptionOpenSearchException
-
deleteAllPits
public DeleteAllPitsResponse deleteAllPits(DeleteAllPitsRequest request) throws IOException, OpenSearchException Deletes all active point in time searches.- Throws:
IOExceptionOpenSearchException
-
deleteAllPits
public final DeleteAllPitsResponse deleteAllPits(Function<DeleteAllPitsRequest.Builder, ObjectBuilder<DeleteAllPitsRequest>> fn) throws IOException, OpenSearchExceptionDeletes all active point in time searches.- Parameters:
fn- a function that initializes a builder to create theDeleteAllPitsRequest- Throws:
IOExceptionOpenSearchException
-
deleteAllPits
Deletes all active point in time searches.- Throws:
IOExceptionOpenSearchException
-
deleteByQuery
public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) throws IOException, OpenSearchException Deletes documents matching the provided query.- Throws:
IOExceptionOpenSearchException
-
deleteByQuery
public final DeleteByQueryResponse deleteByQuery(Function<DeleteByQueryRequest.Builder, ObjectBuilder<DeleteByQueryRequest>> fn) throws IOException, OpenSearchExceptionDeletes documents matching the provided query.- Parameters:
fn- a function that initializes a builder to create theDeleteByQueryRequest- Throws:
IOExceptionOpenSearchException
-
deleteByQueryRethrottle
public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryRethrottleRequest request) throws IOException, OpenSearchException Changes the number of requests per second for a particular Delete By Query operation.- Throws:
IOExceptionOpenSearchException
-
deleteByQueryRethrottle
public final DeleteByQueryRethrottleResponse deleteByQueryRethrottle(Function<DeleteByQueryRethrottleRequest.Builder, ObjectBuilder<DeleteByQueryRethrottleRequest>> fn) throws IOException, OpenSearchExceptionChanges 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:
IOExceptionOpenSearchException
-
deletePit
public DeletePitResponse deletePit(DeletePitRequest request) throws IOException, OpenSearchException Deletes one or more point in time searches based on the IDs passed.- Throws:
IOExceptionOpenSearchException
-
deletePit
public final DeletePitResponse deletePit(Function<DeletePitRequest.Builder, ObjectBuilder<DeletePitRequest>> fn) throws IOException, OpenSearchExceptionDeletes one or more point in time searches based on the IDs passed.- Parameters:
fn- a function that initializes a builder to create theDeletePitRequest- Throws:
IOExceptionOpenSearchException
-
deleteScript
public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOException, OpenSearchException Deletes a script.- Throws:
IOExceptionOpenSearchException
-
deleteScript
public final DeleteScriptResponse deleteScript(Function<DeleteScriptRequest.Builder, ObjectBuilder<DeleteScriptRequest>> fn) throws IOException, OpenSearchExceptionDeletes a script.- Parameters:
fn- a function that initializes a builder to create theDeleteScriptRequest- Throws:
IOExceptionOpenSearchException
-
exists
Returns information about whether a document exists in an index.- Throws:
IOExceptionOpenSearchException
-
exists
public final BooleanResponse exists(Function<ExistsRequest.Builder, ObjectBuilder<ExistsRequest>> fn) throws IOException, OpenSearchExceptionReturns information about whether a document exists in an index.- Parameters:
fn- a function that initializes a builder to create theExistsRequest- Throws:
IOExceptionOpenSearchException
-
existsSource
public BooleanResponse existsSource(ExistsSourceRequest request) throws IOException, OpenSearchException Returns information about whether a document source exists in an index.- Throws:
IOExceptionOpenSearchException
-
existsSource
public final BooleanResponse existsSource(Function<ExistsSourceRequest.Builder, ObjectBuilder<ExistsSourceRequest>> fn) throws IOException, OpenSearchExceptionReturns information about whether a document source exists in an index.- Parameters:
fn- a function that initializes a builder to create theExistsSourceRequest- Throws:
IOExceptionOpenSearchException
-
fieldCaps
public FieldCapsResponse fieldCaps(FieldCapsRequest request) throws IOException, OpenSearchException Returns the information about the capabilities of fields among multiple indexes.- Throws:
IOExceptionOpenSearchException
-
fieldCaps
public final FieldCapsResponse fieldCaps(Function<FieldCapsRequest.Builder, ObjectBuilder<FieldCapsRequest>> fn) throws IOException, OpenSearchExceptionReturns the information about the capabilities of fields among multiple indexes.- Parameters:
fn- a function that initializes a builder to create theFieldCapsRequest- Throws:
IOExceptionOpenSearchException
-
fieldCaps
Returns the information about the capabilities of fields among multiple indexes.- Throws:
IOExceptionOpenSearchException
-
getAllPits
public GetAllPitsResponse getAllPits(GetAllPitsRequest request) throws IOException, OpenSearchException Lists all active point in time searches.- Throws:
IOExceptionOpenSearchException
-
getAllPits
public final GetAllPitsResponse getAllPits(Function<GetAllPitsRequest.Builder, ObjectBuilder<GetAllPitsRequest>> fn) throws IOException, OpenSearchExceptionLists all active point in time searches.- Parameters:
fn- a function that initializes a builder to create theGetAllPitsRequest- Throws:
IOExceptionOpenSearchException
-
getAllPits
Lists all active point in time searches.- Throws:
IOExceptionOpenSearchException
-
getScript
public GetScriptResponse getScript(GetScriptRequest request) throws IOException, OpenSearchException Returns a script.- Throws:
IOExceptionOpenSearchException
-
getScript
public final GetScriptResponse getScript(Function<GetScriptRequest.Builder, ObjectBuilder<GetScriptRequest>> fn) throws IOException, OpenSearchExceptionReturns a script.- Parameters:
fn- a function that initializes a builder to create theGetScriptRequest- Throws:
IOExceptionOpenSearchException
-
getScriptContext
public GetScriptContextResponse getScriptContext(GetScriptContextRequest request) throws IOException, OpenSearchException Returns all script contexts.- Throws:
IOExceptionOpenSearchException
-
getScriptContext
public final GetScriptContextResponse getScriptContext(Function<GetScriptContextRequest.Builder, ObjectBuilder<GetScriptContextRequest>> fn) throws IOException, OpenSearchExceptionReturns all script contexts.- Parameters:
fn- a function that initializes a builder to create theGetScriptContextRequest- Throws:
IOExceptionOpenSearchException
-
getScriptContext
Returns all script contexts.- Throws:
IOExceptionOpenSearchException
-
getScriptLanguages
public GetScriptLanguagesResponse getScriptLanguages(GetScriptLanguagesRequest request) throws IOException, OpenSearchException Returns available script types, languages and contexts.- Throws:
IOExceptionOpenSearchException
-
getScriptLanguages
public final GetScriptLanguagesResponse getScriptLanguages(Function<GetScriptLanguagesRequest.Builder, ObjectBuilder<GetScriptLanguagesRequest>> fn) throws IOException, OpenSearchExceptionReturns available script types, languages and contexts.- Parameters:
fn- a function that initializes a builder to create theGetScriptLanguagesRequest- Throws:
IOExceptionOpenSearchException
-
getScriptLanguages
public final GetScriptLanguagesResponse getScriptLanguages() throws IOException, OpenSearchExceptionReturns available script types, languages and contexts.- Throws:
IOExceptionOpenSearchException
-
info
Returns basic information about the cluster.- Throws:
IOExceptionOpenSearchException
-
info
public final InfoResponse info(Function<InfoRequest.Builder, ObjectBuilder<InfoRequest>> fn) throws IOException, OpenSearchExceptionReturns basic information about the cluster.- Parameters:
fn- a function that initializes a builder to create theInfoRequest- Throws:
IOExceptionOpenSearchException
-
info
Returns basic information about the cluster.- Throws:
IOExceptionOpenSearchException
-
mtermvectors
public MtermvectorsResponse mtermvectors(MtermvectorsRequest request) throws IOException, OpenSearchException Returns multiple termvectors in one request.- Throws:
IOExceptionOpenSearchException
-
mtermvectors
public final MtermvectorsResponse mtermvectors(Function<MtermvectorsRequest.Builder, ObjectBuilder<MtermvectorsRequest>> fn) throws IOException, OpenSearchExceptionReturns multiple termvectors in one request.- Parameters:
fn- a function that initializes a builder to create theMtermvectorsRequest- Throws:
IOExceptionOpenSearchException
-
mtermvectors
Returns multiple termvectors in one request.- Throws:
IOExceptionOpenSearchException
-
ping
Returns whether the cluster is running.- Throws:
IOExceptionOpenSearchException
-
ping
public final BooleanResponse ping(Function<PingRequest.Builder, ObjectBuilder<PingRequest>> fn) throws IOException, OpenSearchExceptionReturns whether the cluster is running.- Parameters:
fn- a function that initializes a builder to create thePingRequest- Throws:
IOExceptionOpenSearchException
-
ping
Returns whether the cluster is running.- Throws:
IOExceptionOpenSearchException
-
putScript
public PutScriptResponse putScript(PutScriptRequest request) throws IOException, OpenSearchException Creates or updates a script.- Throws:
IOExceptionOpenSearchException
-
putScript
public final PutScriptResponse putScript(Function<PutScriptRequest.Builder, ObjectBuilder<PutScriptRequest>> fn) throws IOException, OpenSearchExceptionCreates or updates a script.- Parameters:
fn- a function that initializes a builder to create thePutScriptRequest- Throws:
IOExceptionOpenSearchException
-
rankEval
Allows to evaluate the quality of ranked search results over a set of typical search queries.- Throws:
IOExceptionOpenSearchException
-
rankEval
public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectBuilder<RankEvalRequest>> fn) throws IOException, OpenSearchExceptionAllows 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:
IOExceptionOpenSearchException
-
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:
IOExceptionOpenSearchException
-
reindex
public final ReindexResponse reindex(Function<ReindexRequest.Builder, ObjectBuilder<ReindexRequest>> fn) throws IOException, OpenSearchExceptionAllows 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:
IOExceptionOpenSearchException
-
reindexRethrottle
public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest request) throws IOException, OpenSearchException Changes the number of requests per second for a particular reindex operation.- Throws:
IOExceptionOpenSearchException
-
reindexRethrottle
public final ReindexRethrottleResponse reindexRethrottle(Function<ReindexRethrottleRequest.Builder, ObjectBuilder<ReindexRethrottleRequest>> fn) throws IOException, OpenSearchExceptionChanges the number of requests per second for a particular reindex operation.- Parameters:
fn- a function that initializes a builder to create theReindexRethrottleRequest- Throws:
IOExceptionOpenSearchException
-
renderSearchTemplate
public RenderSearchTemplateResponse renderSearchTemplate(RenderSearchTemplateRequest request) throws IOException, OpenSearchException Allows to use the Mustache language to pre-render a search definition.- Throws:
IOExceptionOpenSearchException
-
renderSearchTemplate
public final RenderSearchTemplateResponse renderSearchTemplate(Function<RenderSearchTemplateRequest.Builder, ObjectBuilder<RenderSearchTemplateRequest>> fn) throws IOException, OpenSearchExceptionAllows to use the Mustache language to pre-render a search definition.- Parameters:
fn- a function that initializes a builder to create theRenderSearchTemplateRequest- Throws:
IOExceptionOpenSearchException
-
renderSearchTemplate
public final RenderSearchTemplateResponse renderSearchTemplate() throws IOException, OpenSearchExceptionAllows to use the Mustache language to pre-render a search definition.- Throws:
IOExceptionOpenSearchException
-
searchShards
public SearchShardsResponse searchShards(SearchShardsRequest request) throws IOException, OpenSearchException Returns information about the indexes and shards that a search request would be executed against.- Throws:
IOExceptionOpenSearchException
-
searchShards
public final SearchShardsResponse searchShards(Function<SearchShardsRequest.Builder, ObjectBuilder<SearchShardsRequest>> fn) throws IOException, OpenSearchExceptionReturns information about the indexes and shards that a search request would be executed against.- Parameters:
fn- a function that initializes a builder to create theSearchShardsRequest- Throws:
IOExceptionOpenSearchException
-
searchShards
Returns information about the indexes and shards that a search request would be executed against.- Throws:
IOExceptionOpenSearchException
-
updateByQuery
public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) throws IOException, OpenSearchException Performs an update on every document in the index without changing the source, for example to pick up a mapping change.- Throws:
IOExceptionOpenSearchException
-
updateByQuery
public final UpdateByQueryResponse updateByQuery(Function<UpdateByQueryRequest.Builder, ObjectBuilder<UpdateByQueryRequest>> fn) throws IOException, OpenSearchExceptionPerforms 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 builder to create theUpdateByQueryRequest- Throws:
IOExceptionOpenSearchException
-
updateByQueryRethrottle
public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryRethrottleRequest request) throws IOException, OpenSearchException Changes the number of requests per second for a particular Update By Query operation.- Throws:
IOExceptionOpenSearchException
-
updateByQueryRethrottle
public final UpdateByQueryRethrottleResponse updateByQueryRethrottle(Function<UpdateByQueryRethrottleRequest.Builder, ObjectBuilder<UpdateByQueryRethrottleRequest>> fn) throws IOException, OpenSearchExceptionChanges 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:
IOExceptionOpenSearchException
-