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

Robert Muir commented on LUCENE-4746:
-------------------------------------

I opened LUCENE-6146 to fix the api first.

I have more concerns about allowing hard links on os X 
(http://arstechnica.com/apple/2011/07/mac-os-x-10-7/12/) or even using them at 
all, because its not obvious and at least could be hellacious for tests (dir A 
calls crash() on a file its done with but dir B is still using, etc). 

Maybe as a first step, we should optimize this to use Files.copy? its a 
conservative and safer step and can be faster depending on the OS, on windows 
it calls a special method, on linux etc its a read-write loop in JNI.

> Create a move method in Directory.
> ----------------------------------
>
>                 Key: LUCENE-4746
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4746
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.9, Trunk
>
>         Attachments: LUCENE-4746.patch, LUCENE-4746.patch
>
>
> I'd like to make a move method for directory.
> We already have a move for Solr in DirectoryFactory, but it seems it belongs 
> at the directory level really.
> The default impl can do a copy and delete, but most implementations will be 
> able to optimize to a rename.
> Besides the move we do for Solr (to move a replicated index into place), it 
> would also be useful for another feature I'd like to add - the ability to 
> merge an index with moves rather than copies. In some cases, you don't 
> need/want to copy all the files and could just rename/move them. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to