wuyunfeng commented on issue #940: LUCENE-9002: Query caching leads to absurdly 
slow queries
URL: https://github.com/apache/lucene-solr/pull/940#issuecomment-542227509
 
 
   @jgq2008303393  I guess you don's get my point, compound query cache 
sub-clause just because the compound query call the 
`IndexSearcher#createWeight`, then  the default `createWeight` cache the 
sub-clause. 
   
   ```
     public Weight createWeight(Query query, ScoreMode scoreMode, float boost) 
throws IOException {
       final QueryCache queryCache = this.queryCache;
       Weight weight = query.createWeight(this, scoreMode, boost);
       if (scoreMode.needsScores() == false && queryCache != null) {
         weight = queryCache.doCache(weight, queryCachingPolicy);
       }
       return weight;
     }
   ```
    If the  compound query  just `createWeight` and do not cache the 
sub-clause, this problem maybe not happend?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to