# Get attribute type

**URL:** <https://discuss.elastic.co/t/get-attribute-type/3953>\
**Category:** Elasticsearch\
**Created:** [February 21, 2011, 1:19pm UTC](https://discuss.elastic.co/t/get-attribute-type/3953 "2011-02-21T13:19:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ridvan\_Gyundogan](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ridvan\_Gyundogan](https://discuss.elastic.co/u/Ridvan_Gyundogan)\
**Post date:** [February 21, 2011, 1:19pm UTC](https://discuss.elastic.co/t/get-attribute-type/3953/1 "2011-02-21T13:19:08Z")

</div>

Hi, in the docs I see that I can change the type of a field with the  
followng:

$ curl -XPUT [http://localhost:9200/twitter/user/\_mapping](http://localhost:9200/twitter/user/_mapping) -d '{  
"properties" : {  
"name" : { "type" : "string" }  
}  
}'

but how to get the current type of a field "name"?

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [February 21, 2011, 1:44pm UTC](https://discuss.elastic.co/t/get-attribute-type/3953/2 "2011-02-21T13:44:10Z")

</div>

Hi Ridvan

> Hi, in the docs I see that I can change the type of a field with the  
> followng:

Beware - you can't change the existing type. You can add new types.

> but how to get the current type of a field "name"?

You can get the current mapping using GET mapping:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

clint

---

<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:** [July 6, 2017, 4:11am UTC](https://discuss.elastic.co/t/get-attribute-type/3953/3 "2017-07-06T04:11:46Z")

</div>


