sgup432 commented on issue #15097:
URL: https://github.com/apache/lucene/issues/15097#issuecomment-3203458040

   I did some research, I don't see a nice way to solve this until unless we 
implement Accountable for most of the queries(like TermQuery etc) and 
BooleanQuery eventually. Might be too intrusive if it is only required in the 
cache.
   
   Using `RamUsageEstimator.sizeOf()` for non accountable query seems to return 
much larger size than actual. For example: for a simple TermQuery `foo:bar` it 
gives the size as 1168 bytes, whereas if I just implement Accountable for 
TermQuery and use `BASE_RAM_BYTES + term.ramBytesUsed();`, it turns to be 144 
bytes which looks more realistic.
   
   Probably Option#2(Disable caching BooleanQueries with very high number of 
clauses) might be a much easier change to avoid storing large boolean queries? 
Though doesn't cover all the query types and not full prood. I'll wait to hear 
more opinions on this.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to