# Ingest pipeline : error if field does not exist - record missing

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-error-if-field-does-not-exist-record-missing/177343>\
**Category:** Elasticsearch\
**Created:** [April 17, 2019, 4:32pm UTC](https://discuss.elastic.co/t/ingest-pipeline-error-if-field-does-not-exist-record-missing/177343 "2019-04-17T16:32:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayer/32/42164_2.png) [@mayer](https://discuss.elastic.co/u/mayer)\
**Post date:** [April 17, 2019, 4:32pm UTC](https://discuss.elastic.co/t/ingest-pipeline-error-if-field-does-not-exist-record-missing/177343/1 "2019-04-17T16:32:36Z")

</div>

Dear All,

my environment ELK 6.6.1  
I have data with IP addresses which I want to load in a bulk. I wrote a ingest pipeline which converts IP to "geo\_point". This works generally fine but if the record doesn't have this field I am missing this data completly in the elasticsearch database. So I add an "on\_failure" but this doesn't help too. This is my filter:

```
PUT _ingest/pipeline/geoip
{
  "description": "Add geoip info",
  "processors": [
    {
      "geoip": {
        "field": "fortiip",
        "target_field": "geoip_tmp",
        "properties": [
          "location"
        ]
      }
    },
    {
      "set": {
        "field": "geoip",
        "value": "{{geoip_tmp.location.lat}}, {{geoip_tmp.location.lon}}"
      }
    },
    {
      "remove": {
        "field": "geoip_tmp"
      }
    }
  ],
  "on_failure": [
    {
      "set": {
        "field": "geoip",
        "value": "NULL"
      }
    }
  ]
}

```

The error message I see is:

```
{
      "index" : {
        "_index" : "spamcalcgrp",
        "_type" : "doc",
        "_id" : "100000154",
        "status" : 500,
        "error" : {
          "type" : "exception",
          "reason" : "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [fortiip] not present as part of path [fortiip]",
          "caused_by" : {
            "type" : "illegal_argument_exception",
            "reason" : "java.lang.IllegalArgumentException: field [fortiip] not present as part of path [fortiip]",
            "caused_by" : {
              "type" : "illegal_argument_exception",
              "reason" : "field [fortiip] not present as part of path [fortiip]"
            }
          },
          "header" : {
            "processor_type" : "geoip"
          }
        }
      }
    },

```

Any ideas how I can avoid this issue.

---

<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:** [May 15, 2019, 4:32pm UTC](https://discuss.elastic.co/t/ingest-pipeline-error-if-field-does-not-exist-record-missing/177343/2 "2019-05-15T16:32:38Z")

</div>

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