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/12/21 18:20:58 UTC

[jira] [Updated] (LUCENE-7600) Simplify DocIdMerger

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

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

Here is a patch that splits DocIdMerger into two impls. One other thing it does is that in the sorted case, it advances all subs but one so that we do not need the {{if (first == false)}} condition in {{next()}}. Moving the cost from {{next()}} to {{reset()}} sounds like a good trade-off to me since the latter is called much less frequently than the former (that said I don't think it will have any perf impact).

> Simplify DocIdMerger
> --------------------
>
>                 Key: LUCENE-7600
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7600
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7600.patch
>
>
> Today, next() is a giant method which handles both the sorted and unsorted cases. It feels like there should be two separate impls for these cases.



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