-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Labels
Area: SpecificationRelated to the API spec used to generate client codeRelated to the API spec used to generate client codebackport 7.17
Description
Java API client version
7.17.2
Java version
17
Elasticsearch Version
7.17.0
Problem description
Using the java client api, I'm unable to create an index with a this mapping
"settings": {
"analysis": {
"tokenizer": {
"espaceTiretTokenizer": {
"type": "pattern",
"pattern": "[\\s,/\\\\-]+"
}
}
}
}
}
elasticsearchClient.indices()
.create(c -> c.index(adresseIndex)
.withJson("settings loaded here")
I got :
co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'PatternTokenizer.flags'
Trying to add
ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true);
as explained in the doc https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/7.17/missing-required-property.html results in
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "co.elastic.clients.util.ApiTypeHelper.requireNonNull(Object, Object, String)" is null
The workaround is to add the 2 properties flags and group but this properties should be optional
Metadata
Metadata
Assignees
Labels
Area: SpecificationRelated to the API spec used to generate client codeRelated to the API spec used to generate client codebackport 7.17