# Storing currency rates along documents?

**URL:** https://discuss.elastic.co/t/storing-currency-rates-along-documents/20690
**Category:** Elasticsearch
**Created:** [November 11, 2014, 3:27pm UTC](https://discuss.elastic.co/t/storing-currency-rates-along-documents/20690 "2014-11-11T15:27:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Michael\_Gallego](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_gallego/32/933_2.png) [@Michael\_Gallego](https://discuss.elastic.co/u/Michael_Gallego)
#### Post date: [November 11, 2014, 3:27pm UTC](https://discuss.elastic.co/t/storing-currency-rates-along-documents/20690/1 "2014-11-11T15:27:25Z")

</div>

Hi,

I need, for each document I index, to store the exact currency conversion  
rates that apply when the document was index. My first naïve idea was to  
index, along the documents, the list of all conversion rates relative to  
the currency of the indexed document. However, I realize that it can  
quickly lead to large indices because of the massive duplication of data,  
but I cannot see any other way to do that.

Any idea about how I could address that in a more efficient way?

(also: the currency rates are then used in a script Expression for  
aggregations. To that extent, is it better to store currency rates as  
doc\_values or standard fields?)

Thanks!

--  
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/15cd6a0b-2ab4-4882-aed2-7875e58f289f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/15cd6a0b-2ab4-4882-aed2-7875e58f289f%40googlegroups.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:50am UTC](https://discuss.elastic.co/t/storing-currency-rates-along-documents/20690/2 "2017-07-06T00:50:49Z")

</div>


