# Dynamic Mapping getting messed up

**URL:** <https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492>\
**Category:** Elasticsearch\
**Created:** [September 14, 2017, 9:21am UTC](https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492 "2017-09-14T09:21:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moneisha](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@moneisha](https://discuss.elastic.co/u/moneisha)\
**Post date:** [September 14, 2017, 9:21am UTC](https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492/1 "2017-09-14T09:21:16Z")

</div>

I am using JDBC input plugin to connect to MySQL databases and get the data to elastic search . I have two configurations to connect to two different databases from the same server .Both config files have different index, document type and fields . With dynamic mapping the indexes are created with fields from both two config files. what is the reason for such case and how it can be solved ?

---

<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:** [September 14, 2017, 9:29am UTC](https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492/2 "2017-09-14T09:29:10Z")

</div>

When there are multiple configuration files, they are merged by log stash. If you do not use [conditionals](https://www.elastic.co/guide/en/logstash/5.6/event-dependent-configuration.html#conditionals) to control the flow, all input data will therefore by default go to all outputs.

---

<div class="post-metadata">

**Author:** ![moneisha](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@moneisha](https://discuss.elastic.co/u/moneisha)\
**Post date:** [September 18, 2017, 8:33am UTC](https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492/3 "2017-09-18T08:33:11Z")

</div>

Thank you @Christian_Dahlqvist

---

<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:** [October 16, 2017, 8:33am UTC](https://discuss.elastic.co/t/dynamic-mapping-getting-messed-up/100492/4 "2017-10-16T08:33:40Z")

</div>

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