# Field data or doc values on the not\_analyzed "raw" value of an analyzed string?

**URL:** <https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420>\
**Category:** Elasticsearch\
**Created:** [November 29, 2016, 1:38am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420 "2016-11-29T01:38:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jthoni](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@jthoni](https://discuss.elastic.co/u/jthoni)\
**Post date:** [November 29, 2016, 1:38am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420/1 "2016-11-29T01:38:59Z")

</div>

We are using ES 2.3.2. We have a large number of fields that we are aggregating on to create a facet like filter pane experience. The values are either non-string, not\_analyzed, or a multi-field for an analyzed string where we have a not\_analyzed raw value that we do the aggregation on.

I am finding that we are getting some JVM thrashing due to field data. As I understand it, values only get loaded into field data when aggregating on an anyalyzed string. In the multifield case, even though we are expressly aggregating on the raw value, is it still using field data as the root indexing for the field was analyzed, and therefore not supported by doc values?

Thanks,  
~john

---

<div class="post-metadata">

**Author:** ![jthoni](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@jthoni](https://discuss.elastic.co/u/jthoni)\
**Post date:** [December 1, 2016, 5:10am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420/2 "2016-12-01T05:10:10Z")

</div>

ping

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [December 1, 2016, 11:29am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420/3 "2016-12-01T11:29:02Z")

</div>

Can you share the relevant part of your mapping?

---

<div class="post-metadata">

**Author:** ![jthoni](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@jthoni](https://discuss.elastic.co/u/jthoni)\
**Post date:** [December 5, 2016, 12:06am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420/4 "2016-12-05T00:06:44Z")

</div>

This is the default dynamic mapping for our string fields:

"dynamic\_templates": [  
{  
"strings": {  
"mapping": {  
"type": "string",  
"fields": {  
"raw": {  
"ignore\_above": 256,  
"index": "not\_analyzed",  
"type": "string"  
}  
}  
},  
"match\_mapping\_type": "string"  
}  
}  
],  
We query on the field, and aggregate on the raw (not\_analyzed) field.

---

<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:** [January 2, 2017, 12:06am UTC](https://discuss.elastic.co/t/field-data-or-doc-values-on-the-not-analyzed-raw-value-of-an-analyzed-string/67420/5 "2017-01-02T00:06:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
