# Does doc\_values supports array of docs?

**URL:** <https://discuss.elastic.co/t/does-doc-values-supports-array-of-docs/20535>\
**Category:** Elasticsearch\
**Created:** [November 3, 2014, 8:44am UTC](https://discuss.elastic.co/t/does-doc-values-supports-array-of-docs/20535 "2014-11-03T08:44:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garbin\_Huang](https://avatars.discourse-cdn.com/v4/letter/g/edb3f5/32.png) [@Garbin\_Huang](https://discuss.elastic.co/u/Garbin_Huang)\
**Post date:** [November 3, 2014, 8:44am UTC](https://discuss.elastic.co/t/does-doc-values-supports-array-of-docs/20535/1 "2014-11-03T08:44:54Z")

</div>

I have a doc like this

{  
title:'',  
distr\_sentiment:[  
{k:"key1", v:"value1"},  
{k:"key2", v:"value2"}  
]  
}

I want to set distr\_sentiment.k and distr\_sentiment.v doc\_values=true, But  
I got an error with this message "MergeMappingException[Merge failed with  
failures {[mapper [distr\_sentiment.v] has different doc\_values values,  
mapper [distr\_sentiment.k] has different doc\_values values]}]", How can I  
use doc\_values in array of docs? Oh what can I do to reduce the memory  
useage on sorting and aggs on this fields?

--  
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/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [November 3, 2014, 9:03am UTC](https://discuss.elastic.co/t/does-doc-values-supports-array-of-docs/20535/2 "2014-11-03T09:03:49Z")

</div>

Hi,

I believe you are trying to enable doc\_values on an existing index?  
Unfortunately, it cannot be added on the fly and needs to be configured at  
index creation time (which means you will need to reindex if you already  
have some data indexed).

On Mon, Nov 3, 2014 at 9:44 AM, Garbin Huang [garbinh@gmail.com](mailto:garbinh@gmail.com) wrote:

> I have a doc like this
> 
> {  
> title:'',  
> distr\_sentiment:[  
> {k:"key1", v:"value1"},  
> {k:"key2", v:"value2"}  
> ]  
> }
> 
> I want to set distr\_sentiment.k and distr\_sentiment.v doc\_values=true, But  
> I got an error with this message "MergeMappingException[Merge failed with  
> failures {[mapper [distr\_sentiment.v] has different doc\_values values,  
> mapper [distr\_sentiment.k] has different doc\_values values]}]", How can I  
> use doc\_values in array of docs? Oh what can I do to reduce the memory  
> useage on sorting and aggs on this fields?
> 
> --  
> 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/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f48b8220-eaef-4c52-847f-2c292b259f88%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j7zYE2CixxnQ7aaC5cPkAHSd5ympFooQL%2B98%3DTuP6Lwyw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7zYE2CixxnQ7aaC5cPkAHSd5ympFooQL%2B98%3DTuP6Lwyw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:52am UTC](https://discuss.elastic.co/t/does-doc-values-supports-array-of-docs/20535/3 "2017-07-06T00:52:34Z")

</div>


