Class ElasticsearchQueryRulesAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchQueryRulesAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteRule
(DeleteRuleRequest request) Delete a query rule.Delete a query rule.deleteRuleset
(DeleteRulesetRequest request) Delete a query ruleset.Delete a query ruleset.getRule
(GetRuleRequest request) Get a query rule.final CompletableFuture<GetRuleResponse>
Get a query rule.getRuleset
(GetRulesetRequest request) Get a query ruleset.Get a query ruleset.Get all query rulesets.listRulesets
(ListRulesetsRequest request) Get all query rulesets.Get all query rulesets.putRule
(PutRuleRequest request) Create or update a query rule.final CompletableFuture<PutRuleResponse>
Create or update a query rule.putRuleset
(PutRulesetRequest request) Create or update a query ruleset.Create or update a query ruleset.test
(TestRequest request) Test a query ruleset.final CompletableFuture<TestResponse>
Test a query ruleset.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchQueryRulesAsyncClient
-
ElasticsearchQueryRulesAsyncClient
public ElasticsearchQueryRulesAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchQueryRulesAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchQueryRulesAsyncClient>
-
deleteRule
Delete a query rule. Delete a query rule within a query ruleset. This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.- See Also:
-
deleteRule
public final CompletableFuture<DeleteRuleResponse> deleteRule(Function<DeleteRuleRequest.Builder, ObjectBuilder<DeleteRuleRequest>> fn) Delete a query rule. Delete a query rule within a query ruleset. This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.- Parameters:
fn
- a function that initializes a builder to create theDeleteRuleRequest
- See Also:
-
deleteRuleset
Delete a query ruleset. Remove a query ruleset and its associated data. This is a destructive action that is not recoverable.- See Also:
-
deleteRuleset
public final CompletableFuture<DeleteRulesetResponse> deleteRuleset(Function<DeleteRulesetRequest.Builder, ObjectBuilder<DeleteRulesetRequest>> fn) Delete a query ruleset. Remove a query ruleset and its associated data. This is a destructive action that is not recoverable.- Parameters:
fn
- a function that initializes a builder to create theDeleteRulesetRequest
- See Also:
-
getRule
Get a query rule. Get details about a query rule within a query ruleset.- See Also:
-
getRule
public final CompletableFuture<GetRuleResponse> getRule(Function<GetRuleRequest.Builder, ObjectBuilder<GetRuleRequest>> fn) Get a query rule. Get details about a query rule within a query ruleset.- Parameters:
fn
- a function that initializes a builder to create theGetRuleRequest
- See Also:
-
getRuleset
Get a query ruleset. Get details about a query ruleset.- See Also:
-
getRuleset
public final CompletableFuture<GetRulesetResponse> getRuleset(Function<GetRulesetRequest.Builder, ObjectBuilder<GetRulesetRequest>> fn) Get a query ruleset. Get details about a query ruleset.- Parameters:
fn
- a function that initializes a builder to create theGetRulesetRequest
- See Also:
-
listRulesets
Get all query rulesets. Get summarized information about the query rulesets.- See Also:
-
listRulesets
public final CompletableFuture<ListRulesetsResponse> listRulesets(Function<ListRulesetsRequest.Builder, ObjectBuilder<ListRulesetsRequest>> fn) Get all query rulesets. Get summarized information about the query rulesets.- Parameters:
fn
- a function that initializes a builder to create theListRulesetsRequest
- See Also:
-
listRulesets
Get all query rulesets. Get summarized information about the query rulesets.- See Also:
-
putRule
Create or update a query rule. Create or update a query rule within a query ruleset.IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule. It is advised to use one or the other in query rulesets, to avoid errors. Additionally, pinned queries have a maximum limit of 100 pinned hits. If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
- See Also:
-
putRule
public final CompletableFuture<PutRuleResponse> putRule(Function<PutRuleRequest.Builder, ObjectBuilder<PutRuleRequest>> fn) Create or update a query rule. Create or update a query rule within a query ruleset.IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule. It is advised to use one or the other in query rulesets, to avoid errors. Additionally, pinned queries have a maximum limit of 100 pinned hits. If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.
- Parameters:
fn
- a function that initializes a builder to create thePutRuleRequest
- See Also:
-
putRuleset
Create or update a query ruleset. There is a limit of 100 rules per ruleset. This limit can be increased by using thexpack.applications.rules.max_rules_per_ruleset
cluster setting.IMPORTANT: Due to limitations within pinned queries, you can only select documents using
ids
ordocs
, but cannot use both in single rule. It is advised to use one or the other in query rulesets, to avoid errors. Additionally, pinned queries have a maximum limit of 100 pinned hits. If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.- See Also:
-
putRuleset
public final CompletableFuture<PutRulesetResponse> putRuleset(Function<PutRulesetRequest.Builder, ObjectBuilder<PutRulesetRequest>> fn) Create or update a query ruleset. There is a limit of 100 rules per ruleset. This limit can be increased by using thexpack.applications.rules.max_rules_per_ruleset
cluster setting.IMPORTANT: Due to limitations within pinned queries, you can only select documents using
ids
ordocs
, but cannot use both in single rule. It is advised to use one or the other in query rulesets, to avoid errors. Additionally, pinned queries have a maximum limit of 100 pinned hits. If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.- Parameters:
fn
- a function that initializes a builder to create thePutRulesetRequest
- See Also:
-
test
Test a query ruleset. Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.- See Also:
-
test
public final CompletableFuture<TestResponse> test(Function<TestRequest.Builder, ObjectBuilder<TestRequest>> fn) Test a query ruleset. Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.- Parameters:
fn
- a function that initializes a builder to create theTestRequest
- See Also:
-