# How to create a multi field mapping for a geo\_shape / text field?

**URL:** <https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559>\
**Category:** Elasticsearch\
**Created:** [August 11, 2020, 1:26pm UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559 "2020-08-11T13:26:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zachsa](https://avatars.discourse-cdn.com/v4/letter/z/7bcc69/32.png) [@zachsa](https://discuss.elastic.co/u/zachsa)\
**Post date:** [August 11, 2020, 1:26pm UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/1 "2020-08-11T13:26:17Z")

</div>

I saw this thread - [Can't create geo\_shape multi field](https://discuss.elastic.co/t/cant-create-geo-shape-multi-field/19034). It looks like it's not possible to create a multi field that includes the type 'geo\_shape' and 'keyword'?

In my particular case I have a dataset with several thousand records, but only a few different possible polygons. So I would like to aggregate on this field...

How to do that?

---

<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:** [August 11, 2020, 2:26pm UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/2 "2020-08-11T14:26:52Z")

</div>

Why not add a separate field that contains the name of the polygon (or possibly a fingerprint/hash)?

---

<div class="post-metadata">

**Author:** ![zachsa](https://avatars.discourse-cdn.com/v4/letter/z/7bcc69/32.png) [@zachsa](https://discuss.elastic.co/u/zachsa)\
**Post date:** [August 12, 2020, 3:12pm UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/3 "2020-08-12T15:12:16Z")

</div>

That would work... although it seems arbitrary to disallow multi field mapping on geo\_shape.

---

<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:** [August 12, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/4 "2020-08-12T15:17:28Z")

</div>

What is the length and format of the geo shape field?

---

<div class="post-metadata">

**Author:** ![zachsa](https://avatars.discourse-cdn.com/v4/letter/z/7bcc69/32.png) [@zachsa](https://discuss.elastic.co/u/zachsa)\
**Post date:** [August 13, 2020, 10:39am UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/5 "2020-08-13T10:39:24Z")

</div>

In my case they are WKT polygons with 5 points (rectangles). i've come to the point of view that pivoting on long text isn't sensible though... still wish that this was mentioned in the docs at least (that certain field types don't support multi field mapping)

---

<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:** [September 10, 2020, 10:39am UTC](https://discuss.elastic.co/t/how-to-create-a-multi-field-mapping-for-a-geo-shape-text-field/244559/6 "2020-09-10T10:39:43Z")

</div>

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