Class PutRulesetRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.query_rules.PutRulesetRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutRulesetRequest
extends RequestBase
implements JsonpSerializable
Create or update a query ruleset. There is a limit of 100 rules per ruleset.
This limit can be increased by using the
xpack.applications.rules.max_rules_per_ruleset cluster setting.
IMPORTANT: Due to limitations within pinned queries, you can only select
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:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutRulesetRequest>Json deserializer forPutRulesetRequeststatic final Endpoint<PutRulesetRequest,PutRulesetResponse, ErrorResponse> Endpoint "query_rules.put_ruleset". -
Method Summary
Modifier and TypeMethodDescriptionstatic PutRulesetRequestrules()Required - API name:rulesfinal StringRequired - The unique identifier of the query ruleset to be created or updated.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutRulesetRequest -
_ENDPOINT
Endpoint "query_rules.put_ruleset".
-
-
Method Details
-
of
public static PutRulesetRequest of(Function<PutRulesetRequest.Builder, ObjectBuilder<PutRulesetRequest>> fn) -
rules
Required - API name:rules -
rulesetId
Required - The unique identifier of the query ruleset to be created or updated.API name:
ruleset_id -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutRulesetRequestDeserializer
protected static void setupPutRulesetRequestDeserializer(ObjectDeserializer<PutRulesetRequest.Builder> op)
-