Get attribute type


(Ridvan Gyundogan) #1

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 -d '{
"properties" : {
"name" : { "type" : "string" }
}
}'

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


(Clinton Gormley) #2

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:

http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html

clint


(system) #3