lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Potential bug in UsageTrackingQueryCachingPolicy
Date Mon, 04 Dec 2017 09:57:21 GMT
Hey Jon,

FYI I fixed this bug you reported at
https://issues.apache.org/jira/browse/LUCENE-8078. Thanks again for
reporting it.

Le lun. 20 nov. 2017 à 16:11, Adrien Grand <jpountz@gmail.com> a écrit :

> Hi Jon,
>
> Sorry for the late reply. You are right that it should return true rather
> than false. Would you like to submit a patch?
>
> Le ven. 3 nov. 2017 à 19:04, Jon Harper <jon.harper87@gmail.com> a écrit :
>
>> Hi,
>>
>> I'm looking at lucene-core UsageTrackingQueryCachingPolicy.java (caching
>> policy for the LRUCache), one line of code looks dubious in the
>> shouldNeverCache method
>>
>> The comment says "For the below queries, it's cheap to notice they cannot
>> match any docs so     we do not bother caching them. "  but then returns
>> false to shouldnevercache for MatchNoDocsQuery
>>
>> Note that empty BooleanQuery and empty DisjunctionMaxQuery return true
>> and hence are never cached
>>
>> Here's a github link to the line in question for easy and quick access.
>>
>>
>> https://github.com/apache/lucene-solr/blob/1d2787464f4709f4960716dd3314c7123324b15b/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java#L71
>>
>>
>> Regards,
>> Jon
>>
>

Mime
View raw message