Open niemyjski opened 5 years ago
Pinging @elastic/es-search (:Search/Mapping)
Any updates on this? Or is there a better way to figure out what document is causing this behavior?
This is still happening on elastic 7.4.2
Pinging @elastic/es-distributed (Team:Distributed)
This seems to me like a problem that's specific to the reindex API. When you are indexing a document, either through the index API or the bulk API, you'd get back the error and it would be possible to associate it with what document caused it. I believe the reindex API should be adapted to do something similar, probably wrap the exception or have better reporting around errors.
Can I try taking this issue? It's my first time trying oss contributions
Hi @niemyjski @javanna, would the following response format be alright?
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Error parsing the response, remote is likely not an Elasticsearch instance"
}
],
"type": "exception",
"reason": "Error parsing the response, remote is likely not an Elasticsearch instance",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:505] [search_response] failed to parse field [hits]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:505] [hits] failed to parse field [hits]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:505] Error occured at index: megacorp document id: 127",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:505] [hit] failed to parse field [_source]",
"caused_by": {
"type": "parsing_exception",
"reason": "[hit] failed to parse [_source]",
"line": 1,
"col": 505,
"caused_by": {
"type": "json_parse_exception",
"reason": "Duplicate field 'age'\n at [Source: (org.apache.http.nio.entity.ContentInputStream); line: 1, column: 514]",
"suppressed": [
{
"type": "illegal_state_exception",
"reason": "Failed to close the XContentBuilder",
"caused_by": {
"type": "i_o_exception",
"reason": "Unclosed object or array found"
}
}
]
}
}
}
}
}
}
},
"status": 500
}
the document id will be at the line:
"reason": "[1:505] Error occured at index: megacorp document id: 127"
Rationale:
Target
object created in this layerProposed solution:
ConstructingObjectParser:parse(XContentParser parser, Context context)
XContentException
in this methodConstructorArg
whose ConstructorArgInfo
corresponds with _id
and _index
It is my first time trying this out, do let me know if there are better solutions, thank you!
Hello, @ellaella12 are you still working on this issue or have you introduced any PR trying to solve it? If not I would love to try fixing this issue as my first contribution to elasticsearch.
Hi @javanna, does this issue persist? If yes and no PR attempts to solve it I would love to try solving it.
Hi @javanna , Can I try to solve it as it is going to be my first contribution
Elasticsearch version (
bin/elasticsearch --version
): 7.4.1Plugins installed: ["mapper-size"]
JVM version (
java -version
): latest docker image.OS version (
uname -a
if on a Unix-like system): latest docker image.Description of the problem including expected versus actual behavior:
I'm doing an external reindex from Elasticsearch 5.6.16 to 7.4.1 and Its working great except for the one index that has 3 million documents in it and I'm randomly getting a parse exception on.... Sure would be great to know what document it is so I could look at it....
I'm not sure on the steps to reproduce other than start an external reindex and get the task status (how I'm seeing this error). If I knew the document I could post it with the mapping.
Provide logs (if relevant):