[
https://issues.apache.org/jira/browse/LUCENE-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953168#comment-15953168
]
Adrien Grand commented on LUCENE-7749:
--------------------------------------
I agree it is a bit error-prone and removing the {{scorer}} method or hiding it
would fix the issue. The way I have been approaching this issue is that it is a
fairly new and experimental API so I'd like to keep it optional for now (ie.
query impls do not have to implement this method). Now that this feature is
released, hopefully we'll get feedback about how well it works, which will
in-turn give us opportunities to improve this API and once we are more
confident about it, we can think about removing the trap that you observed. For
the record, this is my personal opinion and might not be shared by other people
who work on this project.
> IndexOrDocValuesQuery not working with LRUQueryCache (?)
> --------------------------------------------------------
>
> Key: LUCENE-7749
> URL: https://issues.apache.org/jira/browse/LUCENE-7749
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Martin Amirault
> Priority: Minor
> Attachments: LUCENE-7749.patch
>
>
> I was experimenting with 6.5.0-SNAPSHOT and could not see any performance
> improvement using the new IndexOrDocValuesQuery where I would have expected
> some.
> I am using a basic FILTER query (term + point/dv range), along with
> IndexSearcher#search.
> Looking at the stack trace it seems that LRUQueryCache#CachingWrapperWeight
> not delegating the scorerSupplier method is the reason.
> Maybe it is on purpose for the result to be cacheable ? Does that mean
> IndexOrDocValuesQuery is not useable with the default IndexSearcher cache ?
> (Or maybe am I just completely misusing the IndexOrDocValuesQuery feature ?)
> Here is a thread dump of the call to IndexOrDocValuesQuery#scorerSupplier
> {quote}
> at
> org.apache.lucene.search.IndexOrDocValuesQuery$1.scorerSupplier(IndexOrDocValuesQuery.java:148)
> at
> org.apache.lucene.search.IndexOrDocValuesQuery$1.scorer(IndexOrDocValuesQuery.java:168)
> at
> org.apache.lucene.search.LRUQueryCache$CachingWrapperWeight.scorer(LRUQueryCache.java:746)
> at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:126)
> at
> org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)
> at
> org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:381)
> at org.apache.lucene.search.Weight.bulkScorer(Weight.java:160)
> at
> org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:375)
> at
> org.apache.lucene.search.LRUQueryCache$CachingWrapperWeight.cache(LRUQueryCache.java:704)
> at
> org.apache.lucene.search.LRUQueryCache$CachingWrapperWeight.bulkScorer(LRUQueryCache.java:787)
> at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:666)
> at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]