lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4746) Create a move method in Directory.
Date Sat, 02 Feb 2013 14:56:12 GMT


Robert Muir commented on LUCENE-4746:

This is useful for Lucene if you want to copy but don't need to keep around the source file.
Something very useful for addIndexes.

For copy-free addIndexes(Directory...) we could improve FSDir's copy(Directory, String, String)
impl to try to create a hard link, and the existing impl would work.

But on windows i think by default links dont work unless you are administrator, and some other
obscure filesystems probably dont support links either (but do support rename).

And we'd need to be fully on java7 (i think?).

So maybe we need a moveIndexes(Directory...) It could acquire the write lock on all the source
Directories and just move instead of copy (otehrwise its like addIndexes).

> Create a move method in Directory.
> ----------------------------------
>                 Key: LUCENE-4746
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.2, 5.0
> 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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message