[Dspace-tech] Question about moving a collection from one community to another

425 views
Skip to first unread message

Terry Brady

unread,
Aug 26, 2015, 11:29:54 AM8/26/15
to dspac...@lists.sourceforge.net
I see that I am able to move a subcommunity to another community using the community-filiator command.  This command works for me.

I would also like to be able to move a collection from one community to another community.  I have not been able to find a mechanism in the XMLUI or the command line interface to perform this action.  Have I overlooked an existing function?

According to the DSpace Functional Overview (https://wiki.duraspace.org/display/DSDOC3x/Functional+Overview), 
"A collection may appear in more than one community"

Aside from running my own SQL, is there an existing tool to accomplish such a relationship?

Thanks, Terry
--
Terry Brady
Applications Programmer Analyst
Lauinger Information Technology

Mark Ehle

unread,
Aug 26, 2015, 11:29:57 AM8/26/15
to Terry Brady, dspac...@lists.sourceforge.net
Use the  community-filiator tool. Take a look: https://wiki.duraspace.org/display/DSDOC18/Managing+Community+Hierarchy

Hope this helps!

Mark



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Andrea Schweer

unread,
Aug 26, 2015, 11:29:58 AM8/26/15
to Mark Ehle, Terry Brady, dspac...@lists.sourceforge.net
Hi,


On 14/06/13 11:06, Mark Ehle wrote:
Use the  community-filiator tool. Take a look: https://wiki.duraspace.org/display/DSDOC18/Managing+Community+Hierarchy
On Thu, Jun 13, 2013 at 4:42 PM, Terry Brady <tw...@georgetown.edu> wrote:
I see that I am able to move a subcommunity to another community using the community-filiator command.  This command works for me.

I would also like to be able to move a collection from one community to another community.  I have not been able to find a mechanism in the XMLUI or the command line interface to perform this action.  Have I overlooked an existing function?


As Terry wrote, the community filiator works only on communities, not on collections. Writing a tool for moving a collection under a different community has been on my list as "maybe someday" for a while. The one time we've had to do it so far, I did so directly in the database.


According to the DSpace Functional Overview (https://wiki.duraspace.org/display/DSDOC3x/Functional+Overview), 
"A collection may appear in more than one community"

I personally would be very careful with relying on that statement.

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand

Mark Ehle

unread,
Aug 26, 2015, 11:29:59 AM8/26/15
to Andrea Schweer, dspac...@lists.sourceforge.net
Oh. Sorry.

helix84

unread,
Aug 26, 2015, 11:30:04 AM8/26/15
to Terry Brady, dspac...@lists.sourceforge.net
On Thu, Jun 13, 2013 at 10:42 PM, Terry Brady <tw...@georgetown.edu> wrote:
> Aside from running my own SQL, is there an existing tool to accomplish such
> a relationship?

Hi Terry,

I'd look into using AIP import/export of a whole subtree. I know, it's
more invasive than flipping a "pointer" somewhere as
community-filiator does, but it's well documented (not that there
would be any caveats in SQL). So here's how you can export a
collection:

https://wiki.duraspace.org/display/DSDOC3x/AIP+Backup+and+Restore#AIPBackupandRestore-ExportingAIPHierarchy

Then you'd need to delete it and import it using the restore mode
(-r) with a new parent community (-p). Make sure you try this to get
familiar with it, e.g. on demo.dspace.org before you do it in
production.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Terry Brady

unread,
Aug 26, 2015, 11:30:23 AM8/26/15
to dspac...@lists.sourceforge.net
Thanks to all of you for the feedback.  This is very helpful.

I have done a little bit of experimentation with the DSpace export functionality, and I had the impression that I might lose some hierarchical information in the process.  I am encouraged to hear that that information can be preserved on export.  I will do some further experimentation.

Terry

Benjamin Ryan

unread,
Aug 26, 2015, 11:30:28 AM8/26/15
to dspac...@lists.sourceforge.net

Terry,

               Just be aware that if you are using SOLR based statistics you will lose the link (not the actual stats in the SOLR index) to all your previous stats for that collection as the ids will change on import.

 

Regards,

               Ben

 

------------------------------------------------------------------
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail:
 benjam...@manchester.ac.uk
------------------------------------------------------------------

Claudia Jürgen

unread,
Aug 26, 2015, 11:30:29 AM8/26/15
to dspac...@lists.sourceforge.net
Hello Terry,

then you got to fallback to manipulating the database directly (usually
warning about backup etc.)

If e.g. you want to move the collection with id 34 from community id 1
to community id 7 you got to run:

update community2collection set community_id=7 where community_id=1 and
collection_id=34;

The run index-init and oai import.

Hope this helps

Claudia Jürgen
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
>
>
>
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
Claudia Juergen
Universitaetsbibliothek Dortmund
Eldorado
0231/755-4043
https://eldorado.tu-dortmund.de/

helix84

unread,
Aug 26, 2015, 11:30:56 AM8/26/15
to Terry Brady, DSpac...@lists.sourceforge.net
On Mon, Jun 17, 2013 at 3:38 PM, Terry Brady <tw...@georgetown.edu> wrote:
> Would it be sufficient to run index-update rather than index-init after
> updating the community2collection table?

Hi Terry,

I don't think you need to update the Lucene index at all, because you
didn't actually change any item metadata. But I'm not 100% sure.

If you're using Discovery, then you do need to run
update-discovery-index - the Solr index used by Discovery does store
relations.

> It is my understanding that index-init should be run while the application
> server is suspended.

That's true. index-init must be done while Tomcat is down.
index-update and update-discovery-index are done while Tomcat is
running.

Terry Brady

unread,
Aug 26, 2015, 11:30:56 AM8/26/15
to DSpac...@lists.sourceforge.net
Claudia,

Thank you for your advice on this question.

Would it be sufficient to run index-update rather than index-init after updating the community2collection table?

I would like to permit my users to run this command without halting the application server.  

It is my understanding that index-init should be run while the application server is suspended.

Thanks, Terry
Terry Brady
Applications Programmer Analyst
Lauinger Information Technology

helix84

unread,
Aug 26, 2015, 11:30:57 AM8/26/15
to Terry Brady, DSpac...@lists.sourceforge.net
On Mon, Jun 17, 2013 at 4:01 PM, helix84 <hel...@centrum.sk> wrote:
> On Mon, Jun 17, 2013 at 3:38 PM, Terry Brady <tw...@georgetown.edu> wrote:
>> Would it be sufficient to run index-update rather than index-init after
>> updating the community2collection table?
>
> Hi Terry,
>
> I don't think you need to update the Lucene index at all, because you
> didn't actually change any item metadata. But I'm not 100% sure.

I think I was wrong. I looked at the index structure and there's a
"location" field that specifies the parent.

I don't see an option to reindex existing items like Discovery has
(see below), so you might have to either run index-init or specify the
updated items using the -i option to index-update.

You can use a tool like Luke to look at the index (located in
[dspace]/search) and check whether the "location" field is updated on
a particular affected item when you run just index-update.

> If you're using Discovery, then you do need to run
> update-discovery-index - the Solr index used by Discovery does store
> relations.

Running just update-discovery-index actually doesn't reindex existing
items. When you do an external change that DSpace is not aware of,
like using SQL in this case, you may need to also reindex all existing
items. To do that, run "update-discovery-index -f".

Terry Brady

unread,
Aug 26, 2015, 11:30:58 AM8/26/15
to DSpac...@lists.sourceforge.net
Thank you for the additional suggestions.

Based on some quick testing, it appears that I do need to run both index-init and update-discovery-index -f to capture the changes.

Terry
Reply all
Reply to author
Forward
0 new messages