# Could not index event to Elasticsearch Errror

**URL:** <https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740>\
**Category:** Elasticsearch\
**Created:** [April 25, 2020, 4:30am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740 "2020-04-25T04:30:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno\_aleixo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_aleixo/32/68834_2.png) [@bruno\_aleixo](https://discuss.elastic.co/u/bruno_aleixo)\
**Post date:** [April 25, 2020, 4:30am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/1 "2020-04-25T04:30:54Z")

</div>

Hi,

Please, help me with error

[2020-04-25T01:23:57,058][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"wl\_audit-2020.04.25", :\_type=\>"doc", :routing=\>nil}, #LogStash::Event:0x75cf378], :response=\>{"index"=\>{"\_index"=\>"wl\_audit-2020.04.25", "\_type"=\>"doc", "\_id"=\>"QlyTr3EBe85au3CB40Vy", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"object mapping for [log] tried to parse field [log] as object, but found a concrete value"}}}}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 25, 2020, 5:29am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/2 "2020-04-25T05:29:15Z")

</div>

It seems you have a mapping conflict. The mapping expects the `log`field to be an object, but in the document causing the error it instead is a string or a number, which is not allowed.

---

<div class="post-metadata">

**Author:** ![bruno\_aleixo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_aleixo/32/68834_2.png) [@bruno\_aleixo](https://discuss.elastic.co/u/bruno_aleixo)\
**Post date:** [April 27, 2020, 3:46pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/3 "2020-04-27T15:46:01Z")

</div>

Hi, thanks by the answer, but can you explain how can i solve it?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 27, 2020, 4:14pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/4 "2020-04-27T16:14:35Z")

</div>

You need to change you event before you index it. As it looks like you are using Logstash you should do it there.

---

<div class="post-metadata">

**Author:** ![bruno\_aleixo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_aleixo/32/68834_2.png) [@bruno\_aleixo](https://discuss.elastic.co/u/bruno_aleixo)\
**Post date:** [April 27, 2020, 5:09pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/5 "2020-04-27T17:09:09Z")

</div>

@Christian_Dahlqvist, again thanks,  
I corrected it as follows, the log field was in lowercase, I changed it to uppercase, I did the restart and it worked, thanks by the fast answer

---

<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 25, 2020, 5:17pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-errror/229740/6 "2020-05-25T17:17:43Z")

</div>

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