Class QueryRule.AbstractBuilder<BuilderT extends QueryRule.AbstractBuilder<BuilderT>>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.query_rules.QueryRule.AbstractBuilder<BuilderT>
- All Implemented Interfaces:
WithJson<BuilderT>
- Direct Known Subclasses:
GetRuleResponse.Builder,QueryRule.Builder
- Enclosing class:
- QueryRule
public abstract static class QueryRule.AbstractBuilder<BuilderT extends QueryRule.AbstractBuilder<BuilderT>>
extends WithJsonObjectBuilderBase<BuilderT>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BuilderTactions(QueryRuleActions value) Required - The actions to take when the rule is matched.final BuilderTRequired - The actions to take when the rule is matched.final BuilderTcriteria(QueryRuleCriteria value, QueryRuleCriteria... values) Required - The criteria that must be met for the rule to be applied.final BuilderTRequired - The criteria that must be met for the rule to be applied.final BuilderTcriteria(List<QueryRuleCriteria> list) Required - The criteria that must be met for the rule to be applied.final BuilderTAPI name:priorityfinal BuilderTRequired - A unique identifier for the rule.protected abstract BuilderTself()final BuilderTtype(QueryRuleType value) Required - The type of rule.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
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:
criteriaAdds all elements of
listtocriteria. -
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:
criteriaAdds one or more values to
criteria. -
criteria
public final BuilderT criteria(Function<QueryRuleCriteria.Builder, ObjectBuilder<QueryRuleCriteria>> fn) 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:
criteriaAdds a value to
criteriausing a builder lambda. -
actions
Required - The actions to take when the rule is matched. The format of this action depends on the rule type.API name:
actions -
actions
public final BuilderT actions(Function<QueryRuleActions.Builder, ObjectBuilder<QueryRuleActions>> fn) 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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<BuilderT extends QueryRule.AbstractBuilder<BuilderT>>
-