# Storing fields in the index?

**URL:** https://discuss.elastic.co/t/storing-fields-in-the-index/8078
**Category:** Elasticsearch
**Created:** [June 13, 2012, 10:29am UTC](https://discuss.elastic.co/t/storing-fields-in-the-index/8078 "2012-06-13T10:29:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Saurabh](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Saurabh](https://discuss.elastic.co/u/Saurabh)
#### Post date: [June 13, 2012, 10:29am UTC](https://discuss.elastic.co/t/storing-fields-in-the-index/8078/1 "2012-06-13T10:29:48Z")

</div>

How to store fields in index using _JAVA API_.

---

<div class="post-metadata">

### Author: ![samCougars](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@samCougars](https://discuss.elastic.co/u/samCougars)
#### Post date: [June 13, 2012, 4:57pm UTC](https://discuss.elastic.co/t/storing-fields-in-the-index/8078/2 "2012-06-13T16:57:26Z")

</div>

did you mean how to index fields?  
If so then pls refer to this my java sample post:  
[http://elasticsearch-users.115913.n3.nabble.com/Sample-of-Java-API-tc3555729.html](http://elasticsearch-users.115913.n3.nabble.com/Sample-of-Java-API-tc3555729.html)

---

<div class="post-metadata">

### Author: ![Saurabh](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Saurabh](https://discuss.elastic.co/u/Saurabh)
#### Post date: [June 13, 2012, 5:22pm UTC](https://discuss.elastic.co/t/storing-fields-in-the-index/8078/3 "2012-06-13T17:22:10Z")

</div>

Indexing the field is fine. I want to know know to mark them as stored or  
not, like in lucene there is an option to mark the field as stored or not.  
Also is there any way to mark the fields as analysed, as we did in lucene?

--  
Saurabh Kumar  
M.Sc (Mathematics) B.E (Computer Science)  
Birla Institute of Technology and Science-Pilani

---

<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, 3:24am UTC](https://discuss.elastic.co/t/storing-fields-in-the-index/8078/4 "2017-07-06T03:24:34Z")

</div>


