Skip to content

Custom Analyzer mapping is not as per the official documentation #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Dishant18 opened this issue Jul 31, 2022 · 3 comments
Closed

Custom Analyzer mapping is not as per the official documentation #361

Dishant18 opened this issue Jul 31, 2022 · 3 comments

Comments

@Dishant18
Copy link

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)

@Enerccio
Copy link

Enerccio commented Aug 9, 2022

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

@p4charu
Copy link

p4charu commented Nov 15, 2022

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)

@l-trotta
Copy link
Contributor

l-trotta commented Feb 1, 2024

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 l-trotta closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants