[ 
https://issues.apache.org/jira/browse/LUCENE-10276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17453777#comment-17453777
 ] 

Angadpreet Nagpal commented on LUCENE-10276:
--------------------------------------------

Hi Adrian & Mike,

Thanks for answering this question! I have tried out per segment cache approach 
and seen the results using our benchmark tools. However, even without there 
being new segments being opened due to updates, I was getting a very less cache 
hit rate(<0.5%) and the time has actually increased in some cases. I had also 
coded an application level cache, however there is an issue of cache staleness 
sue to updates happening on the vectors on which hnsw is being performed. This 
approach had given me significant drop in time spent and much bigger cache hit 
rate.

 

I will use this as a reference in my internal issue tracker as a validation 
that the application level cache is also fine to use and look for solutions for 
the cache staleness issue internally. If I have a good solution will also 
create a pull request for the same.

 

Cheers,

Angadpreet Nagpal

> 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

Reply via email to