Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query cache with ES 5.5 #48

Open
IlCingalese opened this issue Mar 7, 2018 · 1 comment
Open

Query cache with ES 5.5 #48

IlCingalese opened this issue Mar 7, 2018 · 1 comment
Assignees
Labels

Comments

@IlCingalese
Copy link

Hi, i upgrade UR from 0.6 to 0.7 and i notice ES was very slow during query response.
Index size is 2GB with 3,958,758 docs like old index in ES 1.7.
When i run
curl -XGET 'localhost:9200/_stats/request_cache?human'
i se that 0 byte are used for chache query.. so i search on ES docs and found this..
https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html

Requests where size is greater than 0 will not be cached even if the request cache is enabled in the index settings. To cache these requests you will need to use the query-string parameter detailed here.

So i edit EsClient.scala
and change search function url from
s"/$indexName/_search",
to
s"/$indexName/_search?request_cache=true",

run pio build relaunch deploy and notice a great improve on ES response time

and finally running
curl -XGET 'localhost:9200/_stats/request_cache?human'
i saw that query went stored.

Have fun

@pferrel pferrel added the bug label Mar 7, 2018
@pferrel pferrel self-assigned this Mar 7, 2018
@pferrel
Copy link
Collaborator

pferrel commented Mar 7, 2018

Ok, thanks. Our speed tests run on random queries, which are usually the worst case. But this will speedup repeated/duplicate queries, which may be more the norm in deployed servers. Random queries run a fair bit faster with ES 5 vs ES 1.7.

But this might be worth a 0.7.1 release. Thanks much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants