Search code examples
elasticsearchspring-data-elasticsearch

Spring Data Elasticsearch - How to get mapping for a field


Wondering how to do this in java using spring data elasticsearch library.

 GET /my-index-000001/_mapping/field/user

Solution

  • This is not supported by Spring Data Elasticsearch. You'll have to get the mapping for the index and extract the part you need from the returned Map<String, Object>.