# When applying ingest pipeline it fails with "Parse execption, request body is required"

**URL:** <https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788>\
**Category:** Elasticsearch\
**Created:** [May 2, 2020, 3:57am UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788 "2020-05-02T03:57:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![syost](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@syost](https://discuss.elastic.co/u/syost)\
**Post date:** [May 2, 2020, 3:57am UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788/1 "2020-05-02T03:57:45Z")

</div>

I have filebeats going and I'm trying to play around with ingest pipelines. I have accessed the console and defined the following pipeline...

```auto
PUT _ingest/pipeline/upper
{
  "description": "Testing lower to uppercase on fileset.name",
  "processors": [
    {
      "uppercase": {
        "field": "fileset.name"
      }
    }
  ]
}

```

After doing this I validated it was added with `GET _ingest/pipeline/upper` which returned...

```auto
{
  "upper" : {
    "description" : "Testing lower to uppercase on fileset.name",
    "processors" : [
      {
        "uppercase" : {
          "field" : "fileset.name"
        }
      }
    ]
  }
}

```

I try and test it with a single document via...  
`PUT filebeat-7.6.2-2020.05.02-000001/_doc/ny1z03EBxpMbNnRZgGlQ?pipeline=upper` but it returns the following...

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "request body is required"
      }
    ],
    "type" : "parse_exception",
    "reason" : "request body is required"
  },
  "status" : 400
}

```

What am I doing wrong here? I know this is a valid `_id`. When I search by `_id` such as...

```auto
GET filebeat-7.6.2-2020.05.02-000001/_search
{
  "query": {
    "terms": {
      "_id": [
        "ny1z03EBxpMbNnRZgGlQ"
      ]
    }
  }
}

```

I get valid output...

```auto
...
    "hits" : [
      {
        "_index" : "filebeat-7.6.2-2020.05.02-000001",
        "_type" : "_doc",
        "_id" : "ny1z03EBxpMbNnRZgGlQ",
        "_score" : 1.0,
...

```

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [May 2, 2020, 10:44pm UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788/2 "2020-05-02T22:44:09Z")

</div>

Hello @syost

The ingest pipelines are executed when indexing/updating/reindexing a document.  
Not on already indexed documents.

If you want to update an already indexed document, you have to perform an update by query (if your document has`_source` enabled) or reindex to a different index.

May I ask why you want to make it uppercase?

---

<div class="post-metadata">

**Author:** ![syost](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@syost](https://discuss.elastic.co/u/syost)\
**Post date:** [May 5, 2020, 7:26pm UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788/3 "2020-05-05T19:26:11Z")

</div>

@Luca_Belluccini

I was able to get the following to work nicely...

```auto
curl -u elastic -XPUT 'localhost:9200/_ingest/pipeline/classifier?pretty' -H 'Content-Type: application/json' -d '
{                                                                                
    "description": "classifier",                                                 
    "processors": [                                                              
        {                                                                        
            "set_security_user": {                                               
                "field": "user"                                                                                         
            }                                                                    
        }                                                                        
    ]                                                                            
}                                                                                
'

```

```auto
curl -u elastic -XPUT 'localhost:9200/starwars/_bulk?pipeline=classifier' -H 'Content-Type: application/json' --data-binary @starwars_data.json

```

I'm assuming I can somehow point a beat to use a pipeline by specifying the pipeline in it's yaml configuration file too? Thanks for the clarification above.

~ S

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [May 5, 2020, 8:34pm UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788/4 "2020-05-05T20:34:27Z")

</div>

Yes it is possible to point to use a pipeline, but if you are using any module it will be more difficult.

[https://www.elastic.co/guide/en/beats/filebeat/master/configuring-ingest-node.html](https://www.elastic.co/guide/en/beats/filebeat/master/configuring-ingest-node.html)

It can be done also conditionally

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 2, 2020, 8:34pm UTC](https://discuss.elastic.co/t/when-applying-ingest-pipeline-it-fails-with-parse-execption-request-body-is-required/230788/5 "2020-06-02T20:34:28Z")

</div>

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