Index warm up to speed up query time


#1

Hi,
I'd like to know whether there is a way that I can perform some kind of warm-up to speed up query process. Say if I have 50,000 documents in an index, and need to warm up 500 query strings. What I found was if I run es query for every 500 query string , it will boost query speed if I query the same query string again. So users won't experience delay. However, after certain time, say 24 hours, it slows down again when query the same query string. I thought the query result somehow will be cached in memory or hard drive for next same query search. But it doesn't seem like this way. I am new to this field, so any idea about this question would be really appreciated.

Thanks so much


(Mark Walkom) #2

There is a cache, it's an LRU eviction.
https://www.elastic.co/guide/en/elasticsearch/reference/5.1/query-cache.html might be useful.


#3

Thanks for the info.
Additionally, is there any way I can set up cache in hard ware level?

Thanks


(Mark Walkom) #4

Dunno, check your server manuals?


#5

More specifically, the es query I use is full-text query, using match. I assume I can also use LRU eviction, as you mentioned?

In addition, how long does this cache last, e.g. 1 or 2 days? Or there is no setting regarding to how to control how long the search cache last?


#6

Sorry for the typo. I meant can I save cache in hard drive* ? Thanks


(Mark Walkom) #7

Caches like this one are stored in heap.
There is no ability to control how to age them out/


#8

Thanks.

  1. To clarify, I am not so sure about the following statement in the official document. Would you mind to explain? Does this mean if my es query only involves full text search, using match, without bool filter (e.g. should, must ..etc.) will NOT work in cache?

"The query cache only caches queries which are being used in a filter context."

  1. Also, any suggestion of how to test efficiently if cache really works?

Thanks


(system) #9

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