lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Bernstein (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-7689) QueryResultKey saved in cache uses the query after rewrite which causes cache misses
Date Tue, 16 Jun 2015 14:58:01 GMT

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

Joel Bernstein commented on SOLR-7689:
--------------------------------------

I think the problem would be in the query itself. If they are not immutable now, under what
conditions can they change? The Lucene IndexSearcher calls rewrite on the query, do any queries
change internally because of a call like this?

> QueryResultKey saved in cache uses the query after rewrite which causes cache misses
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-7689
>                 URL: https://issues.apache.org/jira/browse/SOLR-7689
>             Project: Solr
>          Issue Type: Bug
>          Components: search, SearchComponents - other
>            Reporter: Emad Nashed
>
> In SolrIndexSearcher class, the key used to lookup results in queryResultCache uses the
original query. 
> However later in createNormalizedWeight the query gets re-written, and then saved in
the queryResultCache after it's re-written. 
> This causes cache misses for the same query, and un-necessary inserts in the queryResultCache.
> I can reproduce this using a re-ranking query that is using a main query as a dismax
query, the dismax Query could be re-written into a TermQuery, which makes sense, but will
cause cache misses.
> I tested a quick solution by just using q.clone()  when it comes to build QueryResultKey,
and it works fine, but not sure if that is the best way of doing it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message