Class QueryRuleCriteria
java.lang.Object
co.elastic.clients.elasticsearch.query_rules.QueryRuleCriteria
- All Implemented Interfaces:
- JsonpSerializable
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<QueryRuleCriteria>Json deserializer forQueryRuleCriteria
- 
Method SummaryModifier and TypeMethodDescriptionfinal Stringmetadata()The metadata field to match against.static QueryRuleCriteriavoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()final QueryRuleCriteriaTypetype()Required - The type of criteria.values()The values to match against themetadatafield.
- 
Field Details- 
_DESERIALIZERJson deserializer forQueryRuleCriteria
 
- 
- 
Method Details- 
ofpublic static QueryRuleCriteria of(Function<QueryRuleCriteria.Builder, ObjectBuilder<QueryRuleCriteria>> fn) 
- 
typeRequired - The type of criteria. The following criteria types are supported:- always: Matches all queries, regardless of input.
- contains: Matches that contain this value anywhere in the field meet the criteria defined by the rule. Only applicable for string values.
- exact: Only exact matches meet the criteria defined by the rule. Applicable for string or numerical values.
- fuzzy: Exact matches or matches within the allowed Levenshtein Edit Distance meet the criteria defined by the rule. Only applicable for string values.
- gt: Matches with a value greater than this value meet the criteria defined by the rule. Only applicable for numerical values.
- gte: Matches with a value greater than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.
- lt: Matches with a value less than this value meet the criteria defined by the rule. Only applicable for numerical values.
- lte: Matches with a value less than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.
- prefix: Matches that start with this value meet the criteria defined by the rule. Only applicable for string values.
- suffix: Matches that end with this value meet the criteria defined by the rule. Only applicable for string values.
 API name: type
- 
metadataThe metadata field to match against. This metadata will be used to match againstmatch_criteriasent in the rule. It is required for all criteria types exceptalways.API name: metadata
- 
valuesThe values to match against themetadatafield. Only one value must match for the criteria to be met. It is required for all criteria types exceptalways.API name: values
- 
serializeSerialize this object to JSON.- Specified by:
- serializein interface- JsonpSerializable
 
- 
serializeInternal
- 
toString
- 
setupQueryRuleCriteriaDeserializerprotected static void setupQueryRuleCriteriaDeserializer(ObjectDeserializer<QueryRuleCriteria.Builder> op) 
 
-