The get-field-mapping API only works for core field types, not for fields of type object or nested:
curl -XPUT "http://localhost:9200/test" -d'
{
"mappings": {
"test": {
"properties": {
"foo": {
"type": "object",
"properties": {
"bar": {
"type": "string"
}
}
}
}
}
}
}'
Retrieving the mapping for core fields works:
curl -XGET "http://localhost:9200/test/_mapping/test/field/foo.bar"
Result:
{
"test": {
"mappings": {
"test": {
"foo.bar": {
"full_name": "foo.bar",
"mapping": {
"bar": {
"type": "string"
}
}
}
}
}
}
}
But not for fields of type object or nested:
curl -XGET "http://localhost:9200/test/_mapping/test/field/foo"
Result:
The get-field-mapping API only works for core field types, not for fields of type
objectornested:Retrieving the mapping for core fields works:
Result:
But not for fields of type
objectornested:Result: