You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2016/02/26 18:11:18 UTC

[jira] [Updated] (LUCENE-7050) Improve the query cache heuristic to detect costly queries

     [ https://issues.apache.org/jira/browse/LUCENE-7050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand updated LUCENE-7050:
---------------------------------
    Attachment: LUCENE-7050.patch

One problem is that some of these queries, like TermsQuery and PointInPolygonQuery are in different modules (queries and sandbox respectively) so we can't refer to them from the caching policy. We could add a new API but it does't feel right to me to add one only for the caching use-case. So maybe we could rely on the class name for popular costly queries that are in other modules? Here is a patch that demonstrates the idea. It is a bit hacky but maybe that's not too bad since the hack is very contained?

> Improve the query cache heuristic to detect costly queries
> ----------------------------------------------------------
>
>                 Key: LUCENE-7050
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7050
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7050.patch
>
>
> Term queries, phrase queries and their combinations through boolean queries should not be cached too agressively since they can efficiently make use of skip lists. However we also have a number of queries that in practice need to visit all matches anyway like PrefixQuery, TermsQuery, PointInSetQuery, PointRangeQuery, so caching them more agressively can help avoid computing all documents that match in the whole index again and again.



--
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