Creating Analyzer Query in Java API Client Elasticsearch version 7.16.3

Hi everyone,
I have a java application in which ElasticSearchClient is used for establishing connection with Elasticsearch server. The application uses BulkRequest for indexing documents.
Following code index the documents in bulk.
BulkResponse bulkResponse = ElasticSearchConfiguration.elasticsearchClient
.bulk(r -> r.index(index).operations(bulkOperations));
I want to use custom analyzer which uses ngram tokenizer while indexing.

Can anyone guide me on how to achieve this in java?

You either specify the mappings when explicitly creating the index or control this through an index template.

thank you for replying but i am looking this solution in java.

That is what you will need to do through the Java APIs. I am not able to provide any examples though, but the docs should contain this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.