# Performance of doc\_values field vs analysed field

**URL:** <https://discuss.elastic.co/t/performance-of-doc-values-field-vs-analysed-field/99445>\
**Category:** Elasticsearch\
**Created:** [September 5, 2017, 2:10pm UTC](https://discuss.elastic.co/t/performance-of-doc-values-field-vs-analysed-field/99445 "2017-09-05T14:10:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [September 6, 2017, 5:09pm UTC](https://discuss.elastic.co/t/performance-of-doc-values-field-vs-analysed-field/99445/2 "2017-09-06T17:09:25Z")

</div>

Will you really need to aggregate over parts of URLs? I suspect not. You could just index it twice: once with type:text and once with `type:keyword` and `index:false`. The first field will be useful to search over url parts and the second field will be be useful to aggregate entire urls.

---

_[View the full topic](https://discuss.elastic.co/t/performance-of-doc-values-field-vs-analysed-field/99445)._
