# No documents added; missing index and parse error

**URL:** <https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178>\
**Category:** Elasticsearch\
**Created:** [February 5, 2019, 6:44pm UTC](https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178 "2019-02-05T18:44:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bret\_Wortman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bret_wortman/32/141922_2.png) [@Bret\_Wortman](https://discuss.elastic.co/u/Bret_Wortman)\
**Post date:** [February 5, 2019, 6:44pm UTC](https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178/1 "2019-02-05T18:44:12Z")

</div>

I upgraded our stack to 6.5.4 yesterday afternoon, and since that time, no new documents have been added to elasticsearch.

The logstash error log shows a slew of errors similar to this:  
`[2019-02-05T17:27:03,540][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status =>400, :action=>["index", {:_id=>nil, :index=>"logstash-2019.02.05", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x6256e156>], :response=>{"index"=>{"_index"=>"logstash-2019.02.05", "_type"=>"doc", "_id"=>nil, "_status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"Failed to parse mapping [_default_]: No handler for type [string] declared on field [filter_host]", "caused_by"=>{"type"=>"mapper_parsing_exception", "reason"=>"No handler for type [string] declared on field [filter_host]"}}}}}`

The template I'm using doesn't say to avoid auto-creation, and in fact the mapping includes (edited down to essentials):

```
logstash:
  order: 0
  index_patterns:
    0: "logstash-*"
[-snip-]
  mappings:
    properties:
      filter_host:
        type: "string"
        index: "not_analyzed"

```

The index is definitely not there:

```
$ curl -XGET http://server:9200/logstash-2019.02.05/_mapping
{"error":"{"root_case::[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"logstash-2019.02.05","index":"logstash-2019.02.05"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"logstash-2019.02.05","index":"logstash-2019.02.05"},"status":404}

```

So I'm not quite sure what the root cause is here. Is there a mapping error that's causing the index to not get created automatically, or is the index not existing causing the mapping error? Should I be looking at Elasticsearch or Logstash at this point?

---

<div class="post-metadata">

**Author:** ![Abhilash\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilash_b/32/40270_2.png) [@Abhilash\_B](https://discuss.elastic.co/u/Abhilash_B)\
**Post date:** [February 5, 2019, 7:00pm UTC](https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178/2 "2019-02-05T19:00:07Z")

</div>

Which version of Elasticsearch are you using? If its 5.x and above, `string` type has been dropped and replaced with `text` or `keyword` as per usecase. You may replace `string` with `text` in the mappings and it'll work.

---

<div class="post-metadata">

**Author:** ![Bret\_Wortman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bret_wortman/32/141922_2.png) [@Bret\_Wortman](https://discuss.elastic.co/u/Bret_Wortman)\
**Post date:** [February 7, 2019, 10:46am UTC](https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178/3 "2019-02-07T10:46:27Z")

</div>

Aha! Thanks. I'm on 6.5.4, so this definitely applies.

---

<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:** [March 7, 2019, 10:46am UTC](https://discuss.elastic.co/t/no-documents-added-missing-index-and-parse-error/167178/4 "2019-03-07T10:46:28Z")

</div>

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