-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Elastic.Transport.UnexpectedTransportException with Indices.GetAsync #8291
New issue
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
Elastic.Transport.UnexpectedTransportException with Indices.GetAsync #8291
Comments
Hi @LearnC0de, please post the complete exception call stack. |
And please format and indent the JSON payload next time you open an issue. It's extremely hard to read this way. I tried to reformat it: {
"settings": {
"analysis": {
"filter": {
"char_filter": {
"space_brackets_hypen_dot": {
"pattern": "",
"type": "pattern_replace"
},
"digits_only": {
"pattern": "[^\\d]",
"type": "pattern_replace"
},
"digits_only_space_replace": {
"pattern": "[^\\d]",
"type": "pattern_replace",
"replacement": " "
}
}
}
}
}
} For me it looks like these index settings are invalid in the first place. You define the filter under |
Hi @flobernd Sorry for the incorrect setting above. Please see the correct index setting below
The complete exception call stack: FailureReason: Unrecoverable/Unexpected BadResponse while attempting GET on https://esserver/indexName
Audit exception in step 1 BadResponse:System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.ICollection Inner Exception: The JSON value could not be converted to System.Collections.Generic.ICollection`1[System.String]. Path: $.char_filter | LineNumber: 0 | BytePositionInLine: 51.System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.ICollection Exception:Elastic.Transport.UnexpectedTransportException: The JSON value could not be converted to System.Collections.Generic.ICollection |
Hi @LearnC0de, thanks for providing the full callstack. This helped to narrow down the exception. It seems that the deserialization failure is not related to Could you please check if you have any analyzer configured and if yes, please post the corresponding JSON payload here as well. |
Hi @flobernd Please find the analyzer settings below
|
Hi @LearnC0de, thanks for the requested analyzer settings! It seems like this is an issue in the specification that is used to generate large parts of the clients. The value of the |
Fixed in 8.15.1. Thanks for reporting @LearnC0de! Please let me know, if this resolves your issue. |
Yes it is working now. Thanks @flobernd ! |
Elastic.Clients.Elasticsearch version: 8.15.0
Elasticsearch version: 7.17.9
.NET runtime version: 8.0
Operating system version:
Try to use await client.Indices.GetAsync(....) and it throws
Elastic.Transport.UnexpectedTransportException : The JSON value could not be converted to System.Collections.Generic.ICollection`1[System.String]. Path: $.char_filter | LineNumber: 0 | BytePositionInLine: 51
Steps to reproduce:
I have an index with a filter in settings:
"settings": {
.......
"analysis": {
"filter" : {
"char_filter" : {
"space_brackets_hypen_dot" : {
"pattern" : "[\s*().-]",
"type" : "pattern_replace"
},
"digits_only" : {
"pattern" : "[^\\d]",
"type" : "pattern_replace"
},
"digits_only_space_replace" : {
"pattern" : "[^\\d]",
"type" : "pattern_replace",
"replacement" : " "
}
},
},
}
}
Expected behavior
Should be able to get back index definition
The text was updated successfully, but these errors were encountered: