Re: [Dspace-tech] Batch move item between collections
Hi Olivier, On 5/13/2015 9:36 PM, Olivier Nicole wrote: Thank you Tim, My guess would be that you may need to reindex. Since you moved the objects manually in the database tables, the browse/search indexes may not be fully aware of the move. Assuming you are using Discovery, you'd likely need to run [dspace]/bin/dspace index-discovery -b That did it. Out of mere curiosity, where are the indexes stored? The indexes are stored in Apache Solr (under the [dspace]/solr/ subdirectories). By default they get updated automatically when you make changes from the User Interface (or other DSpace tools). But if you manually change things in the database itself, Solr won't see those changes, which would require you to reindex. In the future, if you ever encounter the need to move items between Collections, I'd recommend using the Batch Metadata Editing tool. It has the ability to change the Collection(s) associated with any Items, and it will also automatically trigger a reindex for any item updates. The information on changing a Collection in the Batch Metadata Editing tool is here: https://wiki.duraspace.org/display/DSDOC4x/Batch+Metadata+Editing#BatchMetadataEditing-EditingCollectionMembership But does that allow complexs SQL request to select the list of items that will be modified? Using the Batch Metadata Editing Tool you can actually make Collection changes in a CSV file, using the tools like Excel. So, yes, you can make complex changes. But, you'd be using Excel to find the items to move, instead of SQL. When you upload the changed/updated spreadsheet, DSpace will also prompt you to show you which changes you've made, to ensure they look correct (so it's an extra safety check) If you would rather make SQL level changes, it's still possible. But, keep in mind it's inherently dangerous if you are not very careful. Obviously, DSpace cannot monitor what you are doing at the database level, so there's the danger of accidental corruption or deletions. But, what you use is obviously up to you. - Tim -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Batch move item between collections
As Tim noted, complex changes can now be done using filtering in Excel as you can currently only export collections. This would be unpractical with with large result sets (over 10k items). Once this feature gets in, you will be able to export any search query (so you can search based on metadata field and export only those items): https://github.com/DSpace/DSpace/pull/801 Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Batch move item between collections
Thanks Tim, Using the Batch Metadata Editing Tool you can actually make Collection changes in a CSV file, using the tools like Excel. So, yes, you can make complex changes. But, you'd be using Excel to find the items to move, instead of SQL. But I know SQL more than I know Excel :) If you would rather make SQL level changes, it's still possible. But, keep in mind it's inherently dangerous if you are not very careful. Obviously, DSpace cannot monitor what you are doing at the database level, so there's the danger of accidental corruption or deletions. Of course. Best regards, Olivier -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
[Dspace-tech] Batch move item between collections
Hello, I have a large number of items that ended up in the wrong collection. One of the metadata attached to each item will allow me to sort them out, but I need to move the items around in the database. I have seen that the tables item and collection2item both associate an item with a collection. But modifying the collection id in these tables is not enough. The item is now listed like it belongs where it should, but when listing the wrong cllection, the item is still shown there. How can I rectify this? is that a cache or a table I am overlooking? DSpace 4.2 Many thanks in advance, Olivier -- -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Batch move item between collections
Hi Olivier, My guess would be that you may need to reindex. Since you moved the objects manually in the database tables, the browse/search indexes may not be fully aware of the move. Assuming you are using Discovery, you'd likely need to run [dspace]/bin/dspace index-discovery -b In the future, if you ever encounter the need to move items between Collections, I'd recommend using the Batch Metadata Editing tool. It has the ability to change the Collection(s) associated with any Items, and it will also automatically trigger a reindex for any item updates. The information on changing a Collection in the Batch Metadata Editing tool is here: https://wiki.duraspace.org/display/DSDOC4x/Batch+Metadata+Editing#BatchMetadataEditing-EditingCollectionMembership - Tim On 5/13/2015 4:58 AM, Olivier Nicole wrote: Hello, I have a large number of items that ended up in the wrong collection. One of the metadata attached to each item will allow me to sort them out, but I need to move the items around in the database. I have seen that the tables item and collection2item both associate an item with a collection. But modifying the collection id in these tables is not enough. The item is now listed like it belongs where it should, but when listing the wrong cllection, the item is still shown there. How can I rectify this? is that a cache or a table I am overlooking? DSpace 4.2 Many thanks in advance, Olivier -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Batch move item between collections
Thank you Tim, My guess would be that you may need to reindex. Since you moved the objects manually in the database tables, the browse/search indexes may not be fully aware of the move. Assuming you are using Discovery, you'd likely need to run [dspace]/bin/dspace index-discovery -b That did it. Out of mere curiosity, where are the indexes stored? In the future, if you ever encounter the need to move items between Collections, I'd recommend using the Batch Metadata Editing tool. It has the ability to change the Collection(s) associated with any Items, and it will also automatically trigger a reindex for any item updates. The information on changing a Collection in the Batch Metadata Editing tool is here: https://wiki.duraspace.org/display/DSDOC4x/Batch+Metadata+Editing#BatchMetadataEditing-EditingCollectionMembership But does that allow complexs SQL request to select the list of items that will be modified? By complex I mean something like this: update item set owning_collection= 98 where item_id in ( select collection2item.item_id from collection2item, metadatavalue where collection2item.item_id=metadatavalue.item_id and metadata_field_id=24 and collection_id=60 and text_value not like '%IM-%' ) Best regards, Olivier - Tim On 5/13/2015 4:58 AM, Olivier Nicole wrote: Hello, I have a large number of items that ended up in the wrong collection. One of the metadata attached to each item will allow me to sort them out, but I need to move the items around in the database. I have seen that the tables item and collection2item both associate an item with a collection. But modifying the collection id in these tables is not enough. The item is now listed like it belongs where it should, but when listing the wrong cllection, the item is still shown there. How can I rectify this? is that a cache or a table I am overlooking? DSpace 4.2 Many thanks in advance, Olivier -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette