[ https://issues.apache.org/jira/browse/LUCENE-10276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451924#comment-17451924 ]
Adrien Grand commented on LUCENE-10276: --------------------------------------- Actually KnnQuery is unlikely to get ever cached in practice since it usually produces scores and the query cache only caches filters currently, ie. queries where only the set of matching documents matters. > Turning LRUQueryCache On selectively for only a few query classes > ----------------------------------------------------------------- > > Key: LUCENE-10276 > URL: https://issues.apache.org/jira/browse/LUCENE-10276 > Project: Lucene - Core > Issue Type: Task > Reporter: Angadpreet Nagpal > Priority: Minor > > Hi, > I'm part of the Amazon Lucene team. I was trying to get KNN queries to work > with LRUQueryCache. From my understanding, if I have isCacheable to return > true from my query class then it will taken care of. However, I want Lucene > to only turn on the cache for KNN only and not for any other query like > TermQuery, etc which might also be returning true for the isCacheable method. > Is there any easy interface which would allow me to do this without having to > go into each individual query class and returning false for the isCacheable > for all of them or having to write my own cache class. Any help would be > appreciated. > Please correct me if I have incorrectly assumed something. This is my first > issue! > > Thanks, > Angadpreet Nagpal -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org