# How to cache Timestamp field for faster retrieval of data from elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-cache-timestamp-field-for-faster-retrieval-of-data-from-elasticsearch/90919>\
**Category:** Elasticsearch\
**Created:** [June 27, 2017, 6:08am UTC](https://discuss.elastic.co/t/how-to-cache-timestamp-field-for-faster-retrieval-of-data-from-elasticsearch/90919 "2017-06-27T06:08:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushah](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaushah](https://discuss.elastic.co/u/kaushah)\
**Post date:** [June 27, 2017, 6:08am UTC](https://discuss.elastic.co/t/how-to-cache-timestamp-field-for-faster-retrieval-of-data-from-elasticsearch/90919/1 "2017-06-27T06:08:47Z")

</div>

I have mapping like this:

```
{
    "TimeStamp" : "value",
    "Tag1" : ["key" : "value1", "key2" : "value2", "key3" : "value3"]
    "Tag2" : "value"
}

```

I have millions of documents.  
I would like to cache these documents based on TimeStamp field for faster retrieval of \_search queries.  
Think something on the lines of Oracle cache in SQL.  
How do I achieve this?  
Also, any tips on storing this kind of data will be appreciated. Thanks.

---

<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 25, 2017, 6:09am UTC](https://discuss.elastic.co/t/how-to-cache-timestamp-field-for-faster-retrieval-of-data-from-elasticsearch/90919/2 "2017-07-25T06:09:05Z")

</div>

Closed on July 25, 2017, 6:09am UTC

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