generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 218
Open
opensearch-project/opensearch-api-specification
#1014Labels
bugSomething isn't workingSomething isn't working
Description
What is the bug?
An index with a path hierarchy tokenizer that is configured with missing optional parameters (see https://docs.opensearch.org/latest/analyzers/tokenizers/path-hierarchy/) cannot be deserialized with an error.
E.g. Missing required property 'PathHierarchyTokenizer.bufferSize'
How can one reproduce the bug?
- Create a index with path hierarchy tokenizer without setting optional parameters
- Try to retrieve this index using the IndicesClient
What is the expected behavior?
Index should be retrieved without throwing an exception
What is your host/environment?
OS 2.19.3
Client 3.2.0 / 3.3.0
Do you have any screenshots?
java.lang.RuntimeException: Missing required property 'PathHierarchyTokenizer.bufferSize'
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.extractAndWrapCause(ApacheHttpClient5Transport.java:1168)
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.performRequest(ApacheHttpClient5Transport.java:159)
at org.opensearch.client.opensearch.indices.OpenSearchIndicesClientBase.get(OpenSearchIndicesClientBase.java:468)
Do you have any additional context?
Caused by requireNonNull checks in PathHierarchyTokenizer for optional parameters
private PathHierarchyTokenizer(Builder builder) {
super(builder);
this.bufferSize = ApiTypeHelper.requireNonNull(builder.bufferSize, this, "bufferSize");
this.delimiter = ApiTypeHelper.requireNonNull(builder.delimiter, this, "delimiter");
this.replacement = builder.replacement;
this.reverse = ApiTypeHelper.requireNonNull(builder.reverse, this, "reverse");
this.skip = ApiTypeHelper.requireNonNull(builder.skip, this, "skip");
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working