Class PutSynonymRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutSynonymRequest.Builder>
co.elastic.clients.elasticsearch.synonyms.PutSynonymRequest.Builder
- All Implemented Interfaces:
WithJson<PutSynonymRequest.Builder>,ObjectBuilder<PutSynonymRequest>
- Enclosing class:
- PutSynonymRequest
public static class PutSynonymRequest.Builder
extends RequestBase.AbstractBuilder<PutSynonymRequest.Builder>
implements ObjectBuilder<PutSynonymRequest>
Builder for
PutSynonymRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPutSynonymRequest.Required - The ID of the synonyms set to be created or updated.Iftrue, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.protected PutSynonymRequest.Builderself()synonymsSet(SynonymRule value, SynonymRule... values) Required - The synonym rules definitions for the synonyms set.Required - The synonym rules definitions for the synonyms set.synonymsSet(List<SynonymRule> list) Required - The synonym rules definitions for the synonyms set.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
-
Builder
public Builder()
-
-
Method Details
-
id
Required - The ID of the synonyms set to be created or updated.API name:
id -
refresh
Iftrue, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning. Iffalse, analyzers will not be reloaded with the new synonym setAPI name:
refresh -
synonymsSet
Required - The synonym rules definitions for the synonyms set.API name:
synonyms_setAdds all elements of
listtosynonymsSet. -
synonymsSet
Required - The synonym rules definitions for the synonyms set.API name:
synonyms_setAdds one or more values to
synonymsSet. -
synonymsSet
public final PutSynonymRequest.Builder synonymsSet(Function<SynonymRule.Builder, ObjectBuilder<SynonymRule>> fn) Required - The synonym rules definitions for the synonyms set.API name:
synonyms_setAdds a value to
synonymsSetusing a builder lambda. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutSynonymRequest.Builder>
-
build
Builds aPutSynonymRequest.- Specified by:
buildin interfaceObjectBuilder<PutSynonymRequest>- Throws:
NullPointerException- if some of the required fields are null.
-