Custom Analyzer mapping is not as per the official documentation
Java API client version
8.3.2
Java version
8
Elasticsearch Version
8.3
Problem description
The official documentation of custom analyzer mentions that type parameter is optional for custom analyzers. However, the java client throws an exception if the type parameter is missing. Behaviour should be consistent with the docs
Exception: Error deserializing co.elastic.clients.elasticsearch._types.analysis.Analyzer: Property 'type' not found (JSON path: ['test-idx'].settings.index.analysis.analyzer.text_custom_analyzer) (line no=1, column no=1236, offset=-1)
There are lot of errors in this new api which is strange because I would expect this api to mirror elasticsearch api...
Getting a similar error trying to create index with custom settings.
co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch._types.analysis.TokenizerDefinition: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'PathHierarchyTokenizer.bufferSize' (JSON path: analysis.tokenizer.custom_hierarchy)
This was fixed in recent client versions, thanks for the report! @p4charu if the other error you're reporting still exists please open another issue and we'll take a look there :)