Class ElasticsearchQueryRulesClient
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- 
Field SummaryFields inherited from class co.elastic.clients.ApiClienttransport, transportOptions
- 
Constructor SummaryConstructorsConstructorDescriptionElasticsearchQueryRulesClient(ElasticsearchTransport transport, TransportOptions transportOptions) 
- 
Method SummaryModifier and TypeMethodDescriptiondeleteRule(DeleteRuleRequest request) Delete a query rule.final DeleteRuleResponseDelete a query rule.deleteRuleset(DeleteRulesetRequest request) Delete a query ruleset.final DeleteRulesetResponseDelete a query ruleset.getRule(GetRuleRequest request) Get a query rule.final GetRuleResponseGet a query rule.getRuleset(GetRulesetRequest request) Get a query ruleset.final GetRulesetResponseGet a query ruleset.Get all query rulesets.listRulesets(ListRulesetsRequest request) Get all query rulesets.final ListRulesetsResponseGet all query rulesets.putRule(PutRuleRequest request) Create or update a query rule.final PutRuleResponseCreate or update a query rule.putRuleset(PutRulesetRequest request) Create or update a query ruleset.final PutRulesetResponseCreate or update a query ruleset.test(TestRequest request) Test a query ruleset.final TestResponseTest 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- 
ElasticsearchQueryRulesClient
- 
ElasticsearchQueryRulesClientpublic ElasticsearchQueryRulesClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) 
 
- 
- 
Method Details- 
withTransportOptionspublic ElasticsearchQueryRulesClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClientCreates a new client with some request options- Specified by:
- withTransportOptionsin class- ApiClient<ElasticsearchTransport,- ElasticsearchQueryRulesClient> 
 
- 
deleteRulepublic DeleteRuleResponse deleteRule(DeleteRuleRequest request) throws IOException, ElasticsearchException 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.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
deleteRulepublic final DeleteRuleResponse deleteRule(Function<DeleteRuleRequest.Builder, ObjectBuilder<DeleteRuleRequest>> fn) throws IOException, ElasticsearchExceptionDelete 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 the- DeleteRuleRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
deleteRulesetpublic DeleteRulesetResponse deleteRuleset(DeleteRulesetRequest request) throws IOException, ElasticsearchException Delete a query ruleset. Remove a query ruleset and its associated data. This is a destructive action that is not recoverable.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
deleteRulesetpublic final DeleteRulesetResponse deleteRuleset(Function<DeleteRulesetRequest.Builder, ObjectBuilder<DeleteRulesetRequest>> fn) throws IOException, ElasticsearchExceptionDelete 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 the- DeleteRulesetRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getRuleGet a query rule. Get details about a query rule within a query ruleset.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getRulepublic final GetRuleResponse getRule(Function<GetRuleRequest.Builder, ObjectBuilder<GetRuleRequest>> fn) throws IOException, ElasticsearchExceptionGet a query rule. Get details about a query rule within a query ruleset.- Parameters:
- fn- a function that initializes a builder to create the- GetRuleRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getRulesetpublic GetRulesetResponse getRuleset(GetRulesetRequest request) throws IOException, ElasticsearchException Get a query ruleset. Get details about a query ruleset.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getRulesetpublic final GetRulesetResponse getRuleset(Function<GetRulesetRequest.Builder, ObjectBuilder<GetRulesetRequest>> fn) throws IOException, ElasticsearchExceptionGet a query ruleset. Get details about a query ruleset.- Parameters:
- fn- a function that initializes a builder to create the- GetRulesetRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
listRulesetspublic ListRulesetsResponse listRulesets(ListRulesetsRequest request) throws IOException, ElasticsearchException Get all query rulesets. Get summarized information about the query rulesets.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
listRulesetspublic final ListRulesetsResponse listRulesets(Function<ListRulesetsRequest.Builder, ObjectBuilder<ListRulesetsRequest>> fn) throws IOException, ElasticsearchExceptionGet all query rulesets. Get summarized information about the query rulesets.- Parameters:
- fn- a function that initializes a builder to create the- ListRulesetsRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
listRulesetsGet all query rulesets. Get summarized information about the query rulesets.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
putRuleCreate 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. - Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
putRulepublic final PutRuleResponse putRule(Function<PutRuleRequest.Builder, ObjectBuilder<PutRuleRequest>> fn) throws IOException, ElasticsearchExceptionCreate 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 the- PutRuleRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
putRulesetpublic PutRulesetResponse putRuleset(PutRulesetRequest request) throws IOException, ElasticsearchException 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_rulesetcluster setting.IMPORTANT: Due to limitations within pinned queries, you can only select documents using idsordocs, 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.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
putRulesetpublic final PutRulesetResponse putRuleset(Function<PutRulesetRequest.Builder, ObjectBuilder<PutRulesetRequest>> fn) throws IOException, ElasticsearchExceptionCreate 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_rulesetcluster setting.IMPORTANT: Due to limitations within pinned queries, you can only select documents using idsordocs, 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 the- PutRulesetRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
testTest a query ruleset. Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
testpublic final TestResponse test(Function<TestRequest.Builder, ObjectBuilder<TestRequest>> fn) throws IOException, ElasticsearchExceptionTest 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 the- TestRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
 
-