lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7246) Can LRUQueryCache reuse DocIdSets that are created by some queries anyway?
Date Fri, 22 Apr 2016 15:15:13 GMT

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

Robert Muir commented on LUCENE-7246:
-------------------------------------

I see, I agree it is strange for an iterator. must it really be per-DISI thing? that makes
things confusing (and I agree we should avoid adding impl details to the public api).

Why can't it be a thing on Weight somehow?

> Can LRUQueryCache reuse DocIdSets that are created by some queries anyway?
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-7246
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7246
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7246.patch
>
>
> Some queries need to create a DocIdSet to work. This is for instance the case with TermsQuery,
multi-term queries, point-in-set queries and point range queries. We cache them more aggressively
because these queries need to evaluate all matches on a segment before they can return a Scorer.
But this can also be dangerous: if there is little reuse, then we keep converting the doc
id sets that these queries create to another DocIdSet.
> This worries me a bit eg. for point range queries: they made numeric ranges faster in
practice so I would not like caching to make them appear slower than they are when caching
is disabled.
> So I would like to somehow bring back the optimization that we had in 1.x with DocIdSet.isCacheable
so that we do not need to convert DocIdSet instances when we could just reuse existing instances.



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