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

Shai Erera commented on LUCENE-2471:
------------------------------------

Yes, I'm aware of the two methods. The one which accepts a Collection of files 
is better, but it still didn't allow you to rename them in the process. And 
adding another Collection argument, and require that the two will align seemed 
unnecessary. So src.copy(dest, from, to) seemed to be enough.

Copying an entire Directory is used by Lucene code only in RAMDir when it's 
init'ed w/ a Directory. Besides that, the scenario of copying an entire Dir is 
not really clear when it's useful. So the single file copy gives you as much 
flexibility as you need, and less chances of making crucial mistakes.

> Supporting bulk copies in Directory
> -----------------------------------
>
>                 Key: LUCENE-2471
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2471
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Earwin Burrfoot
>
> A method can be added to IndexOutput that accepts IndexInput, and writes 
> bytes using it as a source.
> This should be used for bulk-merge cases (offhand - norms, docstores?). Some 
> Directories can then override default impl and skip intermediate buffers 
> (NIO, MMap, RAM?).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to