ywtsang
(Wing)
June 22, 2012, 6:54am
1
My index size is around 61.7gb with around 7million documents, 10
shards and 1 replica.
Queries with filters and facets works nicely, well belows 500ms.
I met random slowness (around 1 to 3 seconds) on queries with filters
and facets after documents are reindexed, no matter the queries yield
small results (around 50 to 200 results) or large results. If the
queries run 1 to 2 more times, it becomes fast.
I read about "Percolate API" and it can be used to register queries to
warmup index after reindexing documents? But using the percolate to
find and execute the matched queries still do not guarantee the
indexes are well warmup-ed? Because our indexes are being queried
continuously by others at the same time of reindexing. And we are
using bulk index and it seems difficult to use Percolate here.
So how we can effectively warmup the indexes so that queries will not
get this 1 to 3 seconds slowness?
Wing
So how we can effectively warmup the indexes so that queries will not
get this 1 to 3 seconds slowness?
Due out in 0.20: warmup API
opened 03:49PM - 06 May 12 UTC
closed 03:50PM - 06 May 12 UTC
>feature
v0.20.0.RC1
Index warming allows to run registered search requests to warm up the index befo… re it is available for search. With the near real time aspect of search, cold data (segments) will be warmed up before they become available for search.
Warmup searches typically include requests that require heavy loading of data, such as faceting or sorting on specific fields.
The warmup APIs allows to register warmup (search) under specific names, remove them, and get them.
Index warmup can be disabled by setting `index.warmer.enabled` to `false`. It is supported as a realtime setting using update settings API. This can be handy when doing initial bulk indexing, disabling pre registered warmers to make indexing faster and less expensive and then enable it.
## Put Warmer
Allows to put a warmup search request on a specific index (or indices), with the body composing of a regular search request. Types can be provided as part of the URI if the search request is designed to be run only against the specific types.
Here is an example that registers a warmup called `warmer_1` against index `test` (can be alias or several indices), for a search request that runs against all types:
```
curl -XPUT localhost:9200/test/_warmer/warmer_1 -d '{
"query" : {
"match_all" : {}
},
"facets" : {
"facet_1" : {
"terms" : {
"field" : "field"
}
}
}
}'
```
And an example that registers a warmup against specific types:
```
curl -XPUT localhost:9200/test/type1/_warmer/warmer_1 -d '{
"query" : {
"match_all" : {}
},
"facets" : {
"facet_1" : {
"terms" : {
"field" : "field"
}
}
}
}'
```
## Delete Warmer
Removing a warmer can be done against an index (or alias / indices) based on its name. The provided name can be a simple wildcard expression or omitted to remove all warmers. Some samples:
```
# delete warmer named warmer_1 on test index
curl -XDELETE localhost:9200/test/_warmer/warmer_1
# delete all warmers that start with warm on test index
curl -XDELETE localhost:9200/test/_warmer/warm*
# delete all warmers for test index
curl -XDELETE localhost:9200/test/_warmer/
```
## GETting Warmer
Getting a warmer for specific index (or alias, or several indices) based on its name. The provided name can be a simple wildcard expression or omitted to get all warmers. Some examples:
```
# get warmer named warmer_1 on test index
curl -XGET localhost:9200/test/_warmer/warmer_1
# get all warmers that start with warm on test index
curl -XGET localhost:9200/test/_warmer/warm*
# get all warmers for test index
curl -XGET localhost:9200/test/_warmer/
```
clint
ywtsang
(Wing)
June 22, 2012, 8:58am
3
Then, do we have schedule for the launch of 0.20?
Thanks,
Wing
On Fri, Jun 22, 2012 at 3:33 PM, Clinton Gormley clint@traveljury.com wrote:
So how we can effectively warmup the indexes so that queries will not
get this 1 to 3 seconds slowness?
Due out in 0.20: warmup API
Index Warmup API · Issue #1913 · elastic/elasticsearch · GitHub
clint
kimchy
(Shay Banon)
June 25, 2012, 1:08pm
4
There isn't a fixed data for 0.20 release yet. Though several companies use
it in production.
On Fri, Jun 22, 2012 at 10:58 AM, Yiu Wing TSANG ywtsang@gmail.com wrote:
Then, do we have schedule for the launch of 0.20?
Thanks,
Wing
On Fri, Jun 22, 2012 at 3:33 PM, Clinton Gormley clint@traveljury.com
wrote:
So how we can effectively warmup the indexes so that queries will not
get this 1 to 3 seconds slowness?
Due out in 0.20: warmup API
Index Warmup API · Issue #1913 · elastic/elasticsearch · GitHub
clint