# Mapping Problems

**URL:** <https://discuss.elastic.co/t/mapping-problems/248732>\
**Category:** Kibana\
**Created:** [September 15, 2020, 7:47pm UTC](https://discuss.elastic.co/t/mapping-problems/248732 "2020-09-15T19:47:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rart3001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rart3001/32/75625_2.png) [@Rart3001](https://discuss.elastic.co/u/Rart3001)\
**Post date:** [September 15, 2020, 7:47pm UTC](https://discuss.elastic.co/t/mapping-problems/248732/1 "2020-09-15T19:47:01Z")

</div>

Hello, I am new in ElasticSearch, I am trying to create a new mapping with this request:

```auto
PUT /my_index/_mapping
    {
        "mappings": {
            "properties": {
                "avatar": {
                    "type": "text"
                },
                "category": {
                    "type": "text"
                },
                "createAt": {
                    "type": "long"
                },
                "description": {
                    "type": "text"
                },
                "images": {
                    "type": "text"
                },
                "likes": {
                    "type": "long"
                },
                "geohash": {
                    "type": "geo_point"
                },
                "location": {
                    "type": "geo_point"
                },
                "name": {
                    "type": "text"
                },
                "pid": {
                    "type": "text"
                },
                "price": {
                    "type": "long"
                },
                "profile": {
                    "type": "text"
                },
                "subCategory": {
                    "type": "text"
                },
                "thumbnail": {
                    "type": "text"
                },
                "totalComments": {
                    "type": "long"
                },
                "uid": {
                    "type": "text"
                }
            }
        }
    }

```

But I get a error:

```auto
    {
      "error" : {
        "root_cause" : [
          {
            "type" : "mapper_parsing_exception",
            "reason" : "Root mapping definition has unsupported parameters: [mappings : {properties={images={type=text}, subCategory={type=text}, thumbnail={type=text}, profile={type=text}, description={type=text}, pid={type=text}, avatar={type=text}, createAt={type=long}, uid={type=text}, totalComments={type=long}, price={type=long}, name={type=text}, category={type=text}, likes={type=long}}}]"
          }
        ],
        "type" : "mapper_parsing_exception",
        "reason" : "Root mapping definition has unsupported parameters: [mappings : {properties={images={type=text}, subCategory={type=text}, thumbnail={type=text}, profile={type=text}, description={type=text}, pid={type=text}, avatar={type=text}, createAt={type=long}, uid={type=text}, totalComments={type=long}, price={type=long}, name={type=text}, category={type=text}, likes={type=long}}}]"
      },
      "status" : 400
    }

```

I want to use geo\_point search, my original location object was.

```auto
    "location": {
        "geohash": "66jc35pfy",
        "geopoint": [
            "33.513291022392195° S",
            "70.60919690877199° W"
        ]
    }

```

But I don't know what is the best mapping for that. I change the mapping to separate each attribute as I showed in the request above. If anyone can help me.  
Thanks

---

<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:** [September 16, 2020, 1:39am UTC](https://discuss.elastic.co/t/mapping-problems/248732/2 "2020-09-16T01:39:47Z")

</div>

This one worked for me;

```auto
PUT my_index
{
  "mappings": {
    "properties": {
      "avatar": {
        "type": "text"
      },
      "category": {
        "type": "text"
      },
      "createAt": {
        "type": "long"
      },
      "description": {
        "type": "text"
      },
      "images": {
        "type": "text"
      },
      "likes": {
        "type": "long"
      },
      "geohash": {
        "type": "geo_point"
      },
      "location": {
        "type": "geo_point"
      },
      "name": {
        "type": "text"
      },
      "pid": {
        "type": "text"
      },
      "price": {
        "type": "long"
      },
      "profile": {
        "type": "text"
      },
      "subCategory": {
        "type": "text"
      },
      "thumbnail": {
        "type": "text"
      },
      "totalComments": {
        "type": "long"
      },
      "uid": {
        "type": "text"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Rart3001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rart3001/32/75625_2.png) [@Rart3001](https://discuss.elastic.co/u/Rart3001)\
**Post date:** [September 16, 2020, 1:35pm UTC](https://discuss.elastic.co/t/mapping-problems/248732/3 "2020-09-16T13:35:09Z")

</div>

> [@Rart3001](#):
>
> ```auto
> "location": {
> "geohash": "66jc35pfy",
> "geopoint": [
> "33.513291022392195° S",
> "70.60919690877199° W"
> ]
> }
> 
> ```

Thanks, I change to:

```
    "location": {
        "properties": {
            "geohash": {
                "type": "geo_point"
            },
            "geopoint": {
                "type": "geo_point"
            }
        }
    },

```

---

<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 14, 2020, 1:35pm UTC](https://discuss.elastic.co/t/mapping-problems/248732/4 "2020-10-14T13:35:38Z")

</div>

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