Class ElasticsearchSynonymsClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchSynonymsClient>
co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ElasticsearchSynonymsClient
extends ApiClient<ElasticsearchTransport,ElasticsearchSynonymsClient>
Client for the synonyms namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSynonymsClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteSynonym
(DeleteSynonymRequest request) Delete a synonym set.final DeleteSynonymResponse
Delete a synonym set.Delete a synonym rule.deleteSynonymRule
(Function<DeleteSynonymRuleRequest.Builder, ObjectBuilder<DeleteSynonymRuleRequest>> fn) Delete a synonym rule.getSynonym
(GetSynonymRequest request) Get a synonym set.final GetSynonymResponse
Get a synonym set.getSynonymRule
(GetSynonymRuleRequest request) Get a synonym rule.final GetSynonymRuleResponse
Get a synonym rule.Get all synonym sets.getSynonymsSets
(GetSynonymsSetsRequest request) Get all synonym sets.final GetSynonymsSetsResponse
Get all synonym sets.putSynonym
(PutSynonymRequest request) Create or update a synonym set.final PutSynonymResponse
Create or update a synonym set.putSynonymRule
(PutSynonymRuleRequest request) Create or update a synonym rule.final PutSynonymRuleResponse
Create or update a synonym rule.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchSynonymsClient
-
ElasticsearchSynonymsClient
public ElasticsearchSynonymsClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSynonymsClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchSynonymsClient>
-
deleteSynonym
public DeleteSynonymResponse deleteSynonym(DeleteSynonymRequest request) throws IOException, ElasticsearchException Delete a synonym set.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteSynonym
public final DeleteSynonymResponse deleteSynonym(Function<DeleteSynonymRequest.Builder, ObjectBuilder<DeleteSynonymRequest>> fn) throws IOException, ElasticsearchExceptionDelete a synonym set.- Parameters:
fn
- a function that initializes a builder to create theDeleteSynonymRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteSynonymRule
public DeleteSynonymRuleResponse deleteSynonymRule(DeleteSynonymRuleRequest request) throws IOException, ElasticsearchException Delete a synonym rule. Delete a synonym rule from a synonym set.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteSynonymRule
public final DeleteSynonymRuleResponse deleteSynonymRule(Function<DeleteSynonymRuleRequest.Builder, ObjectBuilder<DeleteSynonymRuleRequest>> fn) throws IOException, ElasticsearchExceptionDelete a synonym rule. Delete a synonym rule from a synonym set.- Parameters:
fn
- a function that initializes a builder to create theDeleteSynonymRuleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonym
public GetSynonymResponse getSynonym(GetSynonymRequest request) throws IOException, ElasticsearchException Get a synonym set.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonym
public final GetSynonymResponse getSynonym(Function<GetSynonymRequest.Builder, ObjectBuilder<GetSynonymRequest>> fn) throws IOException, ElasticsearchExceptionGet a synonym set.- Parameters:
fn
- a function that initializes a builder to create theGetSynonymRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonymRule
public GetSynonymRuleResponse getSynonymRule(GetSynonymRuleRequest request) throws IOException, ElasticsearchException Get a synonym rule. Get a synonym rule from a synonym set.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonymRule
public final GetSynonymRuleResponse getSynonymRule(Function<GetSynonymRuleRequest.Builder, ObjectBuilder<GetSynonymRuleRequest>> fn) throws IOException, ElasticsearchExceptionGet a synonym rule. Get a synonym rule from a synonym set.- Parameters:
fn
- a function that initializes a builder to create theGetSynonymRuleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonymsSets
public GetSynonymsSetsResponse getSynonymsSets(GetSynonymsSetsRequest request) throws IOException, ElasticsearchException Get all synonym sets. Get a summary of all defined synonym sets.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonymsSets
public final GetSynonymsSetsResponse getSynonymsSets(Function<GetSynonymsSetsRequest.Builder, ObjectBuilder<GetSynonymsSetsRequest>> fn) throws IOException, ElasticsearchExceptionGet all synonym sets. Get a summary of all defined synonym sets.- Parameters:
fn
- a function that initializes a builder to create theGetSynonymsSetsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSynonymsSets
Get all synonym sets. Get a summary of all defined synonym sets.- Throws:
IOException
ElasticsearchException
- See Also:
-
putSynonym
public PutSynonymResponse putSynonym(PutSynonymRequest request) throws IOException, ElasticsearchException Create or update a synonym set. Synonyms sets are limited to a maximum of 10,000 synonym rules per set. If you need to manage more synonym rules, you can create multiple synonym sets.- Throws:
IOException
ElasticsearchException
- See Also:
-
putSynonym
public final PutSynonymResponse putSynonym(Function<PutSynonymRequest.Builder, ObjectBuilder<PutSynonymRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update a synonym set. Synonyms sets are limited to a maximum of 10,000 synonym rules per set. If you need to manage more synonym rules, you can create multiple synonym sets.- Parameters:
fn
- a function that initializes a builder to create thePutSynonymRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putSynonymRule
public PutSynonymRuleResponse putSynonymRule(PutSynonymRuleRequest request) throws IOException, ElasticsearchException Create or update a synonym rule. Create or update a synonym rule in a synonym set.- Throws:
IOException
ElasticsearchException
- See Also:
-
putSynonymRule
public final PutSynonymRuleResponse putSynonymRule(Function<PutSynonymRuleRequest.Builder, ObjectBuilder<PutSynonymRuleRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update a synonym rule. Create or update a synonym rule in a synonym set.- Parameters:
fn
- a function that initializes a builder to create thePutSynonymRuleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-