Using ES 1.6.0
I have the following query using Transport Client
client.prepareSearch("my-index").setTypes("my-type")
.setQuery(query.getBytes())
.setSearchType(SearchType.SCAN)
.addFields(
"my-field-1",
"my-field-2"
)
.setScroll(new TimeValue(60000))
.setSize(500)
.execute().actionGet();
The query...
{
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"my-user": "100000"
}
},
{
"range": {
"my-date": {
"gte": "2015-03-01",
"lte": "2015-03-31"
}
}
},
{
"bool": {
"should": [
{
"term": {
"shape": "triangle"
}
},
{
"term": {
"shape": "circle"
}
}
]
}
}
]
}
}
}
}
The query has been redacted to protect the innocent (It's the actual query just field names/values where renamed)
The index is 260 million documents, the query produces 30 million hits.
So on each scroll request I print the took ms using, scrollResp.getTookInMillis(). I see pockets of slowness. So some scroll requests will burst with took time of 50ms and other times each scroll will take 4-5 seconds and then it will burst again. And some times each scroll request will humm around 300ms.