在集合之间移动项目 [英] Move items between collections

查看:174
本文介绍了在集合之间移动项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在两个集合之间移动大量的项目。我试图在数据库中直接更改表item和collection2item,列owning_collection和item_id。然后我重新启动了tomcat,清理了茧缓存,重建了索引,并且仍然不起作用。

I need to move a heavy quantity of items between two collections. I tried to change direct at database the tables "item" and "collection2item", columns "owning_collection" and "item_id" respectively. Then I restarted tomcat, cleaned the cocoon cache, rebuilt the index and it's still not working.

进程元数据导出/元数据导入是否比上述更安全或更简单

Is the process metadata-export/metadata-import safer or easier than the above for mass move of items?

我还能做些什么?

推荐答案

p>如果您使用 -bf 标志(只是 -f 可能足够运行reindex,您的进程应该可以太)。

Your process should be ok if you run the reindex with the -bf flags (just -f may be enough too).

没有 -f 标志, reindex (链接到DSpace 5的代码.x)将检查 last_modified 值(在项目表中),只有该列中的值具有自上次reindex以来改变。这也意味着如果您还更新了 last_modified 时间戳,那么没有 -f 的reindex应该可以工作。

Without the -f flag, the reindex (link goes to code as of DSpace 5.x) will check the last_modified value (in the item table) and only reindex items whose value in that column has changed since the last reindex. This also means that a reindex without -f should work if you also updated the last_modified timestamp.

仍然不工作

如果reindex仍然没有发生,还有其他事情错误。检查你的dspace.log - 有没有任何条目,如写项目xyz索引?如果不是,那么项目不会被重新索引。在你做reindex的时候dspace.log里面是否有任何错误信息? solr日志文件中的任何错误消息?

If the reindex still doesn't happen, something else must be going wrong. Check your dspace.log -- are there any entries that look like "wrote item xyz to index"? If not then the items aren't being reindexed. Are there any error messages in the dspace.log around the time you do the reindex? Any error messages in the solr log file?

另外,请确保始终运行reindex(和所有其他 dspace 命令)作为tomcat正在运行的同一用户,以避免权限问题。如果您以其他用户身份运行命令,请更改solr数据目录的权限(可能 [dspace] / solr / search / data ),以便tomcat用户可以在其中创建/写入/删除文件。

Also, make sure you always run the reindex (and all other dspace commands) as the same user that tomcat is running under, to avoid permissions problems. If you've ever run the commands as a different user, change the permissions of the solr data directory (probably [dspace]/solr/search/data) so that the tomcat user can create/write/delete files in it.

整体建议

在大多数情况下,我会自行使用批量元数据编辑,以便在集合之间移动项目,避免所有这些问题,并自动触发受影响项目的重新索引。

In most cases I'd go with batch metadata editing myself for moving items between collections, it avoids all these problems and will trigger a re-index of the affected items automatically.

这篇关于在集合之间移动项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆