# Get list of all the fields in indextype of index using java api

**URL:** <https://discuss.elastic.co/t/get-list-of-all-the-fields-in-indextype-of-index-using-java-api/20619>\
**Category:** Elasticsearch\
**Created:** [November 6, 2014, 10:04pm UTC](https://discuss.elastic.co/t/get-list-of-all-the-fields-in-indextype-of-index-using-java-api/20619 "2014-11-06T22:04:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subbarao\_Kondragunta](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Subbarao\_Kondragunta](https://discuss.elastic.co/u/Subbarao_Kondragunta)\
**Post date:** [November 6, 2014, 10:04pm UTC](https://discuss.elastic.co/t/get-list-of-all-the-fields-in-indextype-of-index-using-java-api/20619/1 "2014-11-06T22:04:52Z")

</div>

Can we get the list of fields of specific index type and index using java?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cb9a5b58-b956-4558-b99a-d8095989d5d1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cb9a5b58-b956-4558-b99a-d8095989d5d1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [November 6, 2014, 11:13pm UTC](https://discuss.elastic.co/t/get-list-of-all-the-fields-in-indextype-of-index-using-java-api/20619/2 "2014-11-06T23:13:01Z")

</div>

I do this by getting the mappings for a specific index, then isolating by  
type if desired. This takes care of all explicitly mapped fields, and also  
any automatically detected and mapped fields.

Especially in the latter case, it's a good way to check and see if  
Elasticsearch is guessing your automatically mapped fields the way you  
expect.

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a1211d2e-530a-4b1a-8b8f-e81cfaf4293f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a1211d2e-530a-4b1a-8b8f-e81cfaf4293f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:51am UTC](https://discuss.elastic.co/t/get-list-of-all-the-fields-in-indextype-of-index-using-java-api/20619/3 "2017-07-06T00:51:38Z")

</div>


