ElasticSearch Pipeline Issue


(Sudhir Kumar) #1

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"
}
}
}
]
}


(Sudhir Kumar) #2

I have figure out the issue


(Colin Goodheart-Smithe) #3

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


(system) #4

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