You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2015/01/03 18:19:34 UTC

[jira] [Updated] (LUCENE-6158) IW.addIndexes(IndexReader...) -> IW.addIndexes(LeafReader...)

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

Robert Muir updated LUCENE-6158:
--------------------------------
    Attachment: LUCENE-6158.patch

> IW.addIndexes(IndexReader...) -> IW.addIndexes(LeafReader...)
> -------------------------------------------------------------
>
>                 Key: LUCENE-6158
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6158
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-6158.patch
>
>
> addIndexes(IndexReader...) is useful to force a single merge that transforms data: you wrap the readers with some logic that alters them.
> But for any use case doing this, they need to work on leaves (LeafReader) to actually do anything.
> Otherwise, for simply merging indexes, allowing addIndexes(IndexReader) is unnecessary and maybe a slight trap, its way faster to call addIndexes(Directory), and it won't force a single slow merge, but will just copy in the relevant files and call maybeMerge(). 
> Part of the confusion is the two methods have such different behavior that i don't think they should be both be named addIndexes. But lets do that separately, first i want to fix the parameters.
> Long term taking LeafReader here is a simple step towards a more performant api for "merging with filterreader", since its horribly inefficient today.



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