How to create custom analyzer using Java API in elasticsearch 7?

Hello All,

I want to create this analyzer using JAVA API of elasticsearch. Can any one help me? I tried to add tokenizer and filter at a same time, but could not do this.

"analysis": {
  "analyzer": {
      "case_insensitive_sort": {
         "tokenizer": "keyword",
         "filter": ["lowercase"]

I get the reference to this.

Till 7.2 I can able to create analyzer using .filter() and .tokenizer() method. Can anyone help on that part?

@elasticsearch -- Can any one can help on this?


the AnalyzeRequest has a couple of custom buildCustomAnalyzer methods where you can specify token filters and char filters settings. There is an example in the analyze documentation for the high level rest client at using maps.


1 Like

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