江別の鈴木です。
このメーリングリストでは初投稿です。どうぞよろしく。
06/12/11 に Tetsuya Yamamoto<yamamoto @ nul.nagoya-u.ac.jp> さんは書きました:
> update-handle-prefix
> コマンドについては知りませんでしたが、下から調べたところ、ほぼ同じことを自動で行なってくれるスクリプトのようですね。最近のバージョンには多分ついてくるのでしょうか。
> http://dspace.cvs.sourceforge.net/dspace/dspace/bin/update-handle-prefix?view=log
update-handle-prefix はv.1.4から追加されたコマンドのようです。山本さんも書かれている
とおり、基本的にsqlを2回実行して、インデックスの再作成をしているだけです。
1.3.2と1.4ではテーブル定義が変わりましたので、そのままでは使えませんが、
以下のpatchをあてれば大丈夫だと思います。(ソースを見ながらコマンドを
打てば済みそうですが)
--- update-handle-prefix 2006-11-21 05:40:39.000000000 +0900
+++ update-handle-prefix.132 2006-12-11 13:53:52.000000000 +0900
@@ -85,7 +85,7 @@
oldPrefixLen=`echo $1 | awk '{print length($1)}'`
echo "update handle set handle=overlay(handle placing '$2'
from 1 for $oldPrefixLen) where handle like '$1%';" | psql
# update the metadatavalue table entries
- echo "update metadatavalue set text_value=overlay(text_value
placing '$2' from 23 for $oldPrefixLen) where text_value like
'http://hdl.handle.net/$1%';" |
psql
+ echo "update dcvalue set text_value=overlay(text_value placing
'$2' from 23 for $oldPrefixLen) where text_value like
'http://hdl.handle.net/$1%';" | psql
# Reindex the site so the indexes contain the new handles
BINDIR=`dirname $0`
$BINDIR/index-all
--
鈴木敬二@江別市