Class PutSynonymRuleRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.synonyms.PutSynonymRuleRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutSynonymRuleRequest
extends RequestBase
implements JsonpSerializable
Create or update a synonym rule. Create or update a synonym rule in a synonym
set.
If any of the synonym rules included is invalid, the API returns an error.
When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.
- 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<PutSynonymRuleRequest>Json deserializer forPutSynonymRuleRequeststatic final Endpoint<PutSynonymRuleRequest,PutSynonymRuleResponse, ErrorResponse> Endpoint "synonyms.put_synonym_rule". -
Method Summary
Modifier and TypeMethodDescriptionstatic PutSynonymRuleRequestfinal Booleanrefresh()Iftrue, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.final StringruleId()Required - The ID of the synonym rule to be updated or created.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final StringsetId()Required - The ID of the synonym set.protected static voidfinal Stringsynonyms()Required - The synonym rule information definition, which must be in Solr format.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutSynonymRuleRequest -
_ENDPOINT
Endpoint "synonyms.put_synonym_rule".
-
-
Method Details
-
of
public static PutSynonymRuleRequest of(Function<PutSynonymRuleRequest.Builder, ObjectBuilder<PutSynonymRuleRequest>> fn) -
refresh
Iftrue, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning. Iffalse, analyzers will not be reloaded with the new synonym ruleAPI name:
refresh -
ruleId
Required - The ID of the synonym rule to be updated or created.API name:
rule_id -
setId
Required - The ID of the synonym set.API name:
set_id -
synonyms
Required - The synonym rule information definition, which must be in Solr format.API name:
synonyms -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutSynonymRuleRequestDeserializer
protected static void setupPutSynonymRuleRequestDeserializer(ObjectDeserializer<PutSynonymRuleRequest.Builder> op)
-