You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing .../companies/_mget?_source_includes=countries.cities.name
I get for certain data following error:
"error": {
"root_cause": [
{
"type": "illegal_state_exception",
"reason": "Failed to close the XContentBuilder"
}
],
"type": "illegal_state_exception",
"reason": "Failed to close the XContentBuilder",
"caused_by": {
"type": "i_o_exception",
"reason": "Unclosed object or array found"
}
}
Elasticsearch Version
8.5.1
Installed Plugins
none
Java Version
elastic cloud docker
OS Version
elastic cloud docker
Problem Description
When executing .../companies/_mget?_source_includes=countries.cities.name
I get for certain data following error:
"error": {
"root_cause": [
{
"type": "illegal_state_exception",
"reason": "Failed to close the XContentBuilder"
}
],
"type": "illegal_state_exception",
"reason": "Failed to close the XContentBuilder",
"caused_by": {
"type": "i_o_exception",
"reason": "Unclosed object or array found"
}
}
Steps to Reproduce
prepare data:
{
"docs": [
{
"_index": "companies",
"_id": "companyA",
"_version": 1,
"_seq_no": 10832,
"_primary_term": 1,
"found": true,
"_source": {
"countries": [
{
"cities": [
{
"name": "brussel"
}
]
},
{
"cities": []
}
]
}
}
]
}
Execute /companies/_mget?_source_includes=country.cities.name
When doing the same with following data it works:
{
"docs": [
{
"_index": "companies",
"_id": "companyB",
"_version": 1,
"_seq_no": 10832,
"_primary_term": 1,
"found": true,
"_source": {
"countries": [
{
"cities": [
{
"name": "brussel"
}
]
},
{
"cities": [
{
"name": "amsterdam"
}
]
}
]
}
}
]
}
This works too:
{
"docs": [
{
"_index": "companies",
"_id": "companyC",
"_version": 1,
"_seq_no": 10832,
"_primary_term": 1,
"found": true,
"_source": {
"countries": [
{
"cities": []
},
{
"cities": []
}
]
}
}
]
}
This works too:
{
"docs": [
{
"_index": "companies",
"_id": "companyD",
"_version": 1,
"_seq_no": 10832,
"_primary_term": 1,
"found": true,
"_source": {
"countries": [
{
"cities": [
{
"name": "brussel"
}
]
},
{
"cities": []
},
{
"cities": [
{
"name": "amsterdam"
}
]
}
]
}
}
]
}
Logs (if relevant)
Invalid NEST response built from a successful (200) low level call on POST: /articles/_mget?_source_includes=countries.cities.name
Audit trail of this API call:
Request:
{"ids":["companyA"]}
Response:
{
"docs": [
{
"_index": "companies",
"_type": "_doc",
"_id": "companyA",
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Failed to get id [companyA] with includes/excludes set"
}
],
"type": "exception",
"reason": "Failed to get id [companyA] with includes/excludes set",
"caused_by": {
"type": "json_parse_exception",
"reason": "Unexpected problem: chain of filtered context broken\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 1, column: 2503]"
}
}
}
]
}
The text was updated successfully, but these errors were encountered: