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 QueryRuleActionsactions()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 Integerpriority()API name:prioritystatic QueryRulefinal StringruleId()Required - A unique identifier for the rule.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <BuilderT extends QueryRule.AbstractBuilder<BuilderT>>
voidsetupQueryRuleDeserializer(ObjectDeserializer<BuilderT> op) toString()final QueryRuleTypetype()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.pinnedwill identify and pin specific documents to the top of search results.excludewill 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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupQueryRuleDeserializer
protected static <BuilderT extends QueryRule.AbstractBuilder<BuilderT>> void setupQueryRuleDeserializer(ObjectDeserializer<BuilderT> op)
-