elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

Custom Analyzer mapping is not as per the official documentation

Open Dishant18 opened this issue 3 years ago • 1 comments

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)

Dishant18 avatar Jul 31 '22 14:07 Dishant18

There are lot of errors in this new api which is strange because I would expect this api to mirror elasticsearch api...

Enerccio avatar Aug 09 '22 08:08 Enerccio

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)

p4charu avatar Nov 15 '22 17:11 p4charu

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 :)

l-trotta avatar Feb 01 '24 16:02 l-trotta