Range filter performance consideration

(Yong Wang) #1

Hi, I am currently make a lot of range filter in this way:

"range":{"date":{"gte":1438358400, "lte":1438358460}}

if we disable cache, does elasticsearch will scan every doc in my index to determine if it falls into the range in this filter?

(Mark Walkom) #2

That is correct.

(Yong Wang) #3

Oh, that's really not a good news for me. Because I have daily indices of 250GB each and I also make a lot of range filter, most of the range are just less then 100 seconds. That means every docs in some index will be read again and again!
in sql database, I know I can setup some field be ordered and no need for full scan for query in my senario. Is there any way for elasticsearch to do in some way like this?

(system) #4