What gets cached is a long value representing a timestamp.
So all filter queries need to use the exact same rounding, e.g. NOW/DAY, else 
they won't hit the cache.

Jan

> 28. sep. 2021 kl. 03:37 skrev Taisuke Miyazaki <[email protected]>:
> 
> Thanks, Markus.
> 
> However, what I was wondering was whether the cache would work for a
> mixture of special syntaxes like NOW/HOUR, NOW/DAY, and queries with
> specific dates, respectively.
> I'm wondering how it works when the firstSearcher uses NOW/DAY but the
> actual query is searching for a specific date.
> 
> Taisuke.
> 
> 
> 2021年9月27日(月) 20:25 Markus Jelsma <[email protected]>:
> 
>> Hello Taisuke,
>> 
>> NOW is rounded down to the current millisecond and cannot be reused a
>> millisecond later. You should always round NOW down to the minute or the
>> hour, or you will pollute the cache.
>> 
>> For example: date:[NOW-7DAY/HOUR TO NOW/HOUR] is cached and is reusable for
>> at most one hour.
>> 
>> Regards,
>> Markus
>> 
>> Op ma 27 sep. 2021 om 13:15 schreef Taisuke Miyazaki <
>> [email protected]>:
>> 
>>> Hi.
>>> 
>>> In fistSearcher and newSearcher, you can set up a query to warm up the
>>> cache.
>>> So, if I write a query like timelimit:[NOW/DAY TO NOW+7DAYS/DAY] and a
>>> cache is created, and the following query comes in, will the cache be
>> used?
>>> 
>>> Suppose today is 2021/09/01
>>> fq=timelimit:[2021-09-01T00:00:00Z TO 2021-09-08T00:00:00Z]
>>> 
>>> In other words, even if I create a cache with a special syntax like
>>> NOW/DAY, will the cache be used when requesting the expanded value?
>>> 
>>> thanks,
>>> 
>>> Taisuke
>>> 
>> 

Reply via email to