# Storing a field w/o indexing it

**URL:** https://discuss.elastic.co/t/storing-a-field-w-o-indexing-it/5103
**Category:** Elasticsearch
**Created:** [August 9, 2011, 11:38pm UTC](https://discuss.elastic.co/t/storing-a-field-w-o-indexing-it/5103 "2011-08-09T23:38:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mrg](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mrg](https://discuss.elastic.co/u/mrg)
#### Post date: [August 9, 2011, 11:38pm UTC](https://discuss.elastic.co/t/storing-a-field-w-o-indexing-it/5103/1 "2011-08-09T23:38:20Z")

</div>

hello - is it possible to have a field that is ignored in the index,  
but  
returned as part of the doc?

eg.

"long\_mime\_encoded\_string" : "xxxx...xx",

What steps or magical incantation enables this setup? Put Mapping API  
looks  
like the sort-of-maybe solution.

As well, performance considerations in doing this?

thanks in advance!

---

<div class="post-metadata">

### Author: ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)
#### Post date: [August 10, 2011, 12:08am UTC](https://discuss.elastic.co/t/storing-a-field-w-o-indexing-it/5103/2 "2011-08-10T00:08:19Z")

</div>

Hey,  
You can do this a few ways. The way that we do it is to have  
explicit mappings (dynamic=false) and store the \_source json and  
include it as part of that.

The other options are:

- Have it in the mappings with index=no,store=no and store it via the  
\_source json
- Have it in the mappings with index=no,store=yes. Then you do not  
need to store the source json.

Best Regards,  
Paul

On Aug 9, 5:38 pm, gleeco [gle...@gmail.com](mailto:gle...@gmail.com) wrote:

> hello - is it possible to have a field that is ignored in the index,  
> but  
> returned as part of the doc?
> 
> eg.
> 
> "long\_mime\_encoded\_string" : "xxxx...xx",
> 
> What steps or magical incantation enables this setup? Put Mapping API  
> looks  
> like the sort-of-maybe solution.
> 
> As well, performance considerations in doing 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:57am UTC](https://discuss.elastic.co/t/storing-a-field-w-o-indexing-it/5103/3 "2017-07-06T03:57:39Z")

</div>


