# Can't merge a non object mapping \[doc.xref.scenarios.scenario.examplesTable.tableTransformers.transformers\] with an object mapping \[doc.xref.scenarios.scenario.examplesTable.tableTransformers.transformers\]

**URL:** <https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers-with-an-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers/162308>\
**Category:** Logstash\
**Created:** [December 28, 2018, 7:19am UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers-with-an-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers/162308 "2018-12-28T07:19:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neha1](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Neha1](https://discuss.elastic.co/u/Neha1)\
**Post date:** [December 28, 2018, 7:19am UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers-with-an-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers/162308/1 "2018-12-28T07:19:49Z")

</div>

Always getting this error while trying to index using logstash

[2018-12-28T10:39:45,549][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"myindex-1", :\_type=\>"mytype-1", :\_routing=\>nil}, #LogStash::Event:0x92accdb], :response=\>{"index"=\>{"\_index"=\>"myindex-1", "\_type"=\>"mytype-1", "\_id"=\>"O4U382cBllSAv7rY4\_NB", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"Can't merge a non object mapping [doc.xref.scenarios.scenario.examplesTable.tableTransformers.transformers] with an object mapping [doc.xref.scenarios.scenario.examplesTable.tableTransformers.transformers]

Logstash config

# The # character at the beginning of a line indicates a comment. Use

# comments to describe your configuration.

input {  
file  
{  
codec =\> multiline {  
pattern =\> '^{'  
negate =\> true  
what =\> previous  
max\_lines =\> 200000  
}  
type =\> "json"  
path =\> "D:/TestElasticSearch/xref.json"  
start\_position =\> "beginning"  
sincedb\_path =\> "/null"  
}  
}  
filter{

mutate  
{  
replace =\> ["message", "%{message}}}"]  
gsub =\> ['message','\n','']  
}  
mutate{  
remove\_field =\> ["[xref][scenarios]"]  
}

if [message] =~ /^{.\*}$/  
{  
json  
{ source =\> "message"  
target =\> "parsedJson"  
}

}

mutate {  
add\_field =\> {  
"Story" =\> "%{[parsedJson][xref][stories][0][story][name]}"  
}  
}  
mutate{  
remove\_field =\> ["message"]  
}  
if "\_jsonparsefailure" in [tags] {  
drop { }  
}

}  
output {  
stdout { codec =\> rubydebug }  
elasticsearch {  
hosts =\> "localhost:9200"  
user =\> "elastic"  
password =\> "changeme"  
index =\> "myindex-5"  
document\_type =\> "mytype-5"  
}  
}

Using Dynamic Mapping Of Elastic Search . Please guide .  
Thanks .

---

<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:** [January 25, 2019, 7:19am UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers-with-an-object-mapping-doc-xref-scenarios-scenario-examplestable-tabletransformers-transformers/162308/2 "2019-01-25T07:19:53Z")

</div>

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