Class QueryRule
java.lang.Object
co.elastic.clients.elasticsearch.query_rules.QueryRule
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
GetRuleResponse
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<QueryRule>
Json deserializer forQueryRule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryRuleActions
actions()
Required - The actions to take when the rule is matched.final List<QueryRuleCriteria>
criteria()
Required - The criteria that must be met for the rule to be applied.final Integer
priority()
API name:priority
static QueryRule
final String
ruleId()
Required - A unique identifier for the rule.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <BuilderT extends QueryRule.AbstractBuilder<BuilderT>>
voidsetupQueryRuleDeserializer
(ObjectDeserializer<BuilderT> op) toString()
final QueryRuleType
type()
Required - The type of rule.
-
Field Details
-
_DESERIALIZER
Json deserializer forQueryRule
-
-
Constructor Details
-
QueryRule
-
-
Method Details
-
queryRuleOf
-
ruleId
Required - A unique identifier for the rule.API name:
rule_id
-
type
Required - The type of rule.pinned
will identify and pin specific documents to the top of search results.exclude
will exclude specific documents from search results.API name:
type
-
criteria
Required - The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.API name:
criteria
-
actions
Required - The actions to take when the rule is matched. The format of this action depends on the rule type.API name:
actions
-
priority
API name:priority
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupQueryRuleDeserializer
protected static <BuilderT extends QueryRule.AbstractBuilder<BuilderT>> void setupQueryRuleDeserializer(ObjectDeserializer<BuilderT> op)
-