You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by ji...@ruminate.co.uk on 2004/05/29 15:50:56 UTC
rename a collection
wondering if anyone has a method of renaming a collection, which may also contain nested collections and documents...cant seem to find anything straightforward ?
tia, Jim Fuller
Re: rename a collection
Posted by Wouter de Vaal <wo...@hotmail.com>.
> jim.fuller@ruminate.co.uk wrote:
>
> >wondering if anyone has a method of renaming a collection, which may also
contain nested collections and documents...cant seem to find anything
straightforward ?
> >
> >
>
> There is no API call to rename a collection; what you can try though is
> to manually create nested collection structure as necessary, shutdown
> database, and copy all the files from old collections over to new
> locations. This might work, no guarantees though - backup before you try
> this.
>
Or how about using a generated name for the collection as it occurs on disk
and using a meta-data attribute to store the human-readable name for the
collection? This way you can change the name anytime you want to.
Downside is that you will have to read the meta-data each time you want to
open a collection by name.
Wouter
Re: rename a collection
Posted by Vadim Gritsenko <va...@reverycodes.com>.
jim.fuller@ruminate.co.uk wrote:
>wondering if anyone has a method of renaming a collection, which may also contain nested collections and documents...cant seem to find anything straightforward ?
>
>
There is no API call to rename a collection; what you can try though is
to manually create nested collection structure as necessary, shutdown
database, and copy all the files from old collections over to new
locations. This might work, no guarantees though - backup before you try
this.
Vadim