# Indexing and Storing some fields

**URL:** <https://discuss.elastic.co/t/indexing-and-storing-some-fields/8603>\
**Category:** Elasticsearch\
**Created:** [August 2, 2012, 12:38am UTC](https://discuss.elastic.co/t/indexing-and-storing-some-fields/8603 "2012-08-02T00:38:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajasuja18](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@ajasuja18](https://discuss.elastic.co/u/ajasuja18)\
**Post date:** [August 2, 2012, 12:38am UTC](https://discuss.elastic.co/t/indexing-and-storing-some-fields/8603/1 "2012-08-02T00:38:12Z")

</div>

Hey,

I have a json document having 50 properties.  
Each property has name-value pair.

Out of 50 Properties, I want to :  
1). Index 10 fields i.e. name-values  
2) Store 20 fields (including 10 indexed above)  
3). Dont want to store and index rest of the fields.

Can someone help me how to define the mapping for this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 2, 2012, 3:19am UTC](https://discuss.elastic.co/t/indexing-and-storing-some-fields/8603/2 "2012-08-02T03:19:46Z")

</div>

Hi,

Did you look at [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/core-types.html) ?  
It should answer.

{  
"tweet" : {  
"properties" : {  
"message" : {  
"type" : "string",  
"store" : "yes",  
"index" : "analyzed",  
"null\_value" : "na"  
}  
}  
}  
}  
You have to play with index and store options.

HTH  
David

--

Le 2 août 2012 à 02:38, ajasuja [jasuja.ankit@gmail.com](mailto:jasuja.ankit@gmail.com) a écrit :

> Hey,
> 
> I have a json document having 50 properties.  
> Each property has name-value pair.
> 
> Out of 50 Properties, I want to :  
> 1). Index 10 fields i.e. name-values  
> 2) Store 20 fields (including 10 indexed above)  
> 3). Dont want to store and index rest of the fields.
> 
> Can someone help me how to define the mapping for this?
> 
> Thanks in advance.

---

<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:18am UTC](https://discuss.elastic.co/t/indexing-and-storing-some-fields/8603/3 "2017-07-06T03:18:02Z")

</div>


