# Elasticsearch index as a key/object storage

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544>\
**Category:** Elasticsearch\
**Created:** [January 29, 2013, 5:12pm UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544 "2013-01-29T17:12:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene\_Strokin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eugene_strokin/32/1238_2.png) [@Eugene\_Strokin](https://discuss.elastic.co/u/Eugene_Strokin)\
**Post date:** [January 29, 2013, 5:12pm UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544/1 "2013-01-29T17:12:08Z")

</div>

Hello,  
one of my index doesn't need any searching. All I need there is just to get  
document's source by ID. Document is a free structure, could have any kind  
of fields which I don't know upfront.  
Could you please help me with mapping? Strangely, I couldn't find any way  
to say: don't index my document no matter structure it would be, just store  
it with some ID.  
Thanks in advance,  
Eugene

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [January 29, 2013, 5:48pm UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544/2 "2013-01-29T17:48:21Z")

</div>

Hey,  
You should do the following:

- Disable dynamic mapping when you create the index (index.mapper.dynamic  
== 0)
- Enable storing of the \_source

That should be it. You will the need to use the GET API to access.

Best Regards,  
Paul

On Tuesday, January 29, 2013 10:12:08 AM UTC-7, Eugene Strokin wrote:

> Hello,  
> one of my index doesn't need any searching. All I need there is just to  
> get document's source by ID. Document is a free structure, could have any  
> kind of fields which I don't know upfront.  
> Could you please help me with mapping? Strangely, I couldn't find any way  
> to say: don't index my document no matter structure it would be, just store  
> it with some ID.  
> Thanks in advance,  
> Eugene

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Eugene\_Strokin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eugene_strokin/32/1238_2.png) [@Eugene\_Strokin](https://discuss.elastic.co/u/Eugene_Strokin)\
**Post date:** [January 29, 2013, 9:12pm UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544/3 "2013-01-29T21:12:56Z")

</div>

Thank you Paul.  
Just wanted to share an example for somebody who would have same question  
later:

Here how you create such index:

curl -XPUT '[http://localhost:9200/MyIndexName/](http://localhost:9200/MyIndexName/)' -d '  
{  
"index": {  
"mapper": {  
"dynamic": false  
},  
"number\_of\_shards": 5,  
"number\_of\_replicas": 1  
}  
}'

Correct me if I'm wrong, but looks like it works.  
Thanks,  
Eugene

On Tuesday, January 29, 2013 12:48:21 PM UTC-5, ppearcy wrote:

> Hey,  
> You should do the following:
> 
> - Disable dynamic mapping when you create the index (index.mapper.dynamic  
> == 0)
> - Enable storing of the \_source
> 
> That should be it. You will the need to use the GET API to access.
> 
> Best Regards,  
> Paul
> 
> On Tuesday, January 29, 2013 10:12:08 AM UTC-7, Eugene Strokin wrote:
> 
> > Hello,  
> > one of my index doesn't need any searching. All I need there is just to  
> > get document's source by ID. Document is a free structure, could have any  
> > kind of fields which I don't know upfront.  
> > Could you please help me with mapping? Strangely, I couldn't find any way  
> > to say: don't index my document no matter structure it would be, just store  
> > it with some ID.  
> > Thanks in advance,  
> > Eugene

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [January 30, 2013, 9:53am UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544/4 "2013-01-30T09:53:03Z")

</div>

On Tue, 2013-01-29 at 13:12 -0800, Eugene Strokin wrote:

> Thank you Paul.  
> Just wanted to share an example for somebody who would have same  
> question later:

I'd consider setting the "enabled" property on the default mapping  
instead:

curl -XPUT '[http://127.0.0.1:9200/my\_index/?pretty=1](http://127.0.0.1:9200/my_index/?pretty=1)' -d '  
{  
"mappings" : {  
"_default_" : {  
"enabled" : false  
}  
}  
}  
'

clint

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:53am UTC](https://discuss.elastic.co/t/elasticsearch-index-as-a-key-object-storage/10544/5 "2017-07-06T02:53:59Z")

</div>

Closed on July 6, 2017, 2:53am UTC


