# Flattened alternative for OSS verrsion

**URL:** <https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029>\
**Category:** Elasticsearch\
**Created:** [April 13, 2021, 3:28pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029 "2021-04-13T15:28:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [April 13, 2021, 3:28pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/1 "2021-04-13T15:28:04Z")

</div>

Is there an alternative/workaround for the flattened mapping type to prevent mapping explosion when using OSS elasticsearch version?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 13, 2021, 10:43pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/2 "2021-04-13T22:43:00Z")

</div>

You'd need to build some code external to ES to do it for you.

Is there a reason you cannot use our Basic distro?

---

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [April 13, 2021, 11:21pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/3 "2021-04-13T23:21:16Z")

</div>

I'm using the [Databases for Elasticsearch](https://cloud.ibm.com/catalog/services/databases-for-elasticsearch-group) service from IBM Cloud which seems to be using OSS, and I don't think I can change it to basic or add external codes to 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 14, 2021, 7:07am UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/4 "2021-04-14T07:07:36Z")

</div>

If you are using the OSS version you will need to manage field counts and document structure before you index.

---

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [April 15, 2021, 3:23pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/5 "2021-04-15T15:23:18Z")

</div>

Does that mean I need to transform the data structure to avoid Elasticsearch tries to create a field for the nested data before indexing?

---

<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 13, 2021, 3:23pm UTC](https://discuss.elastic.co/t/flattened-alternative-for-oss-verrsion/270029/6 "2021-05-13T15:23:52Z")

</div>

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