elastic / elasticsearch-java

Official Elasticsearch Java Client
Apache License 2.0
6 stars 242 forks source link

Why are the fields 'ruleType', 'nametype', and 'languageSet' mandatory for the 'phonetictokenfilter'? #874

Closed powfyy closed 1 month ago

powfyy commented 2 months ago

Java API client version

8.13.4

Java version

17

Elasticsearch Version

8.12.2

Problem description

Why are the fields 'ruleType', 'nametype', and 'languageSet' mandatory for the 'PhoneticTokenFilter'? I'm using the 'double metaphone encoder', so these parameters are not specified in the index schema. When I try to execute the query elasticsearchClient.indices().getSettings(GetIndicesSettingsRequest.of(ginsr -> ginsr .index(oldIndex))).result().get(oldIndex).settings().index().numberOfReplicas(); I get an error "Failed to decode response. co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'PhoneticTokenFilter.<languageset/ruleType/nameType>'"

l-trotta commented 2 months ago

Because it's a bug, thanks for reporting it! We'll fix it soon.

l-trotta commented 1 month ago

Just noticed that this was already fixed with this PR in the API spec, used to generate the clients. Simply update to the more recent version to solve the issue.