opensearch-java
opensearch-java copied to clipboard
[BUG] exception with deserializing 'type' key of analyzer object
What is the bug?
If the index does not have anlayzer's type key, deserialization will fail with an JsonParsingException.
Failed to fetch indices from jakarta.json.stream.JsonParsingException: Property 'type' not found
How can one reproduce the bug?
Request an index created with the settings below using GetIndexRequest
{
"settings":{
"index":{
"number_of_shards":"2",
"number_of_replicas":"0",
"analysis":{
"analyzer":{
"keyword_analyzer":{
"filter":["lowercase"],
"tokenizer":"keyword"
// << ---------------------type key is missing
}
}
}
}
},
"mappings":{
"properties":{
"title":{
"type":"keyword"
}
}
}
}
What is the expected behavior?
If there is no type key value in analyzer, treat it as a 'custom' value
What is your host/environment?
opensearch version: 1.3.8 opensearch-java version: 2.5.0 Java version: 17 Apple M1 Pro
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Cannot change or add type to analyzer of already created index
@wbeckler Hello, I'd like to take up this issue. Can you please assign it to me?
Thank you @SaxenaAnushka102, assigned this to you.