ElasticSearch Pipeline Issue

Hi All,

Could someone help me with sample json parsing using elasticsearch pipeline.
I am creating following pipeline in Elasticsearch 5.4.
PUT _ingest/pipeline/abc
{
"description" : "ABC",
"processors" : [
{
"json" : {
"field": "_source",
"target_field": "json_target"
}
}
]
}

When i do simulate test on this pipeline. I am getting error "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [_source] not present as part of path [_source]"

POST _ingest/pipeline/abc/_simulate
{
"docs" : [
{
"_index": "index",
"_type": "type",
"_id": "id",
"_source": {"foo": 200 }
}
]
}

Error
{
"docs": [
{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [_source] not present as part of path [_source]",
"header": {
"processor_type": "json"
}
}
],
"type": "exception",
"reason": "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [_source] not present as part of path [_source]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "java.lang.IllegalArgumentException: field [_source] not present as part of path [_source]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "field [_source] not present as part of path [_source]"
}
},
"header": {
"processor_type": "json"
}
}
}
]
}

I have figure out the issue

Its helpful if you can post your solution here so that others who come across the same issue can find it later.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.