We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We are trying to create a index using this library and trying to create a pattern replace character filter with no flags. This is generating an error.
It works properly directly via the API.
PUT test-charfilter { "settings": { "analysis": { "analyzer": { "analyzer_fr_FR": { "filter": [ "lowercase", "asciifolding", "remove_duplicates" ], "type": "custom", "tokenizer": "standard", "char_filter": [ "special_char_filter" ] } }, "char_filter": { "special_char_filter": { "pattern": """["@\$#&*{}\[\],\.\=\+\-_\(\);'/\?"]""", "type": "pattern_replace", "replacement": "" } } } } }
we will get
{ "acknowledged": true, "shards_acknowledged": true, "index": "test-charfilter" }
However, when using the lib :
// opensearchClient is injected through a bean String templateSettings = "{"analysis":{"analyzer":{"analyzer_fr_FR":{"filter":["lowercase","asciifolding","remove_duplicates"],"type":"custom","tokenizer":"standard","char_filter":["special_char_filter"]}},"char_filter":{"special_char_filter":{"pattern":"""["@\$#&*{}\[\],\.\=\+\-_\(\);'/\?"]""","type":"pattern_replace","replacement":""}}}}"; JsonpMapper mapper = opensearchClient._transport().jsonpMapper(); JsonParser settingsParser = mapper .jsonProvider() .createParser(new StringReader(templateSettings)); IndexSettings indexSettings = IndexSettings._DESERIALIZER.deserialize(settingsParser, mapper); return CreateIndexRequest.Builder() .settings(indexSettings) .build();
We will get this error
org.opensearch.client.util.MissingRequiredPropertyException - Missing required property 'PatternReplaceCharFilter.flags'
When checking the class opensearch PatternReplaceCharFilter flags is required
opensearch-java/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java
Line 60 in 045c805
However on the class elastic PatternReplaceCharFilter flags is not required
The expected behavior is to be able to build a PatternReplaceCharFilter with no flags or at least know what is the default value to use.
Tested with
N/A
No
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What is the bug?
We are trying to create a index using this library and trying to create a pattern replace character filter with no flags. This is generating an error.
How can one reproduce the bug?
It works properly directly via the API.
we will get
However, when using the lib :
We will get this error
When checking the class opensearch PatternReplaceCharFilter flags is required
opensearch-java/java-client/src/main/java/org/opensearch/client/opensearch/_types/analysis/PatternReplaceCharFilter.java
Line 60 in 045c805
However on the class elastic PatternReplaceCharFilter flags is not required
What is the expected behavior?
The expected behavior is to be able to build a PatternReplaceCharFilter with no flags or at least know what is the default value to use.
What is your host/environment?
Tested with
Do you have any screenshots?
N/A
Do you have any additional context?
No
The text was updated successfully, but these errors were encountered: