# Storing dyanamic key value pairs in Elastic search

**URL:** <https://discuss.elastic.co/t/storing-dyanamic-key-value-pairs-in-elastic-search/15660>\
**Category:** Elasticsearch\
**Created:** [February 7, 2014, 7:54am UTC](https://discuss.elastic.co/t/storing-dyanamic-key-value-pairs-in-elastic-search/15660 "2014-02-07T07:54:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lavanya\_Tejaswy](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Lavanya\_Tejaswy](https://discuss.elastic.co/u/Lavanya_Tejaswy)\
**Post date:** [February 7, 2014, 7:54am UTC](https://discuss.elastic.co/t/storing-dyanamic-key-value-pairs-in-elastic-search/15660/1 "2014-02-07T07:54:02Z")

</div>

Hi,  
Is it possible to store dynamically changing hashmap values in elastic  
search document and index it?  
Eg: my name field must have a {blue=\>black, white=\>red}  
value which I can search.  
Thanks,  
Lavanya

--  
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/5f5b98e7-31ac-4420-b9b2-a4c026575c8e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5f5b98e7-31ac-4420-b9b2-a4c026575c8e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 7, 2014, 12:24pm UTC](https://discuss.elastic.co/t/storing-dyanamic-key-value-pairs-in-elastic-search/15660/2 "2014-02-07T12:24:54Z")

</div>

Lavanya,

Something like this?

{  
"name": [  
{ "blue": "black" },  
{ "white": "red" }  
]  
}

Also how would you want to search it, for example?

--  
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/64d29839-a4d8-4a94-bea7-459c4b256663%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/64d29839-a4d8-4a94-bea7-459c4b256663%40googlegroups.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, 1:51am UTC](https://discuss.elastic.co/t/storing-dyanamic-key-value-pairs-in-elastic-search/15660/3 "2017-07-06T01:51:47Z")

</div>


