重新索引Zebra因为在KOHA集成库系统中没有在opac和Intranet搜索中找到结果

时间:2014-11-14 07:40:12

标签: indexing ubuntu-12.04 zebra

我在Debian服务器上安装了新安装的Koha 3.16。我已经将MARC记录导入到目录中,但是当我在Opac上搜索它时,没有找到结果。

我读了这个链接:My Zebra Indexing won’t work! How do I fix it? (AKA: I search for stuff and nothing comes up! Help!)

我试图按照此链接中的说法进行操作。但不幸的是,我坚持第三步。

export PERL5LIB=/usr/share/koha/lib
export KOHA_CONF=/usr/share/koha/koha-conf.xml
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -x

我运行此命令,但仍然没有运气。我尝试使用以下命令重建zebra:

sudo koha-rebuild-zebra -f -v  mylibrary

结果显示:

Zebra configuration information 
================================ 
Zebra biblio directory      = /var/lib/koha/mylibrary/biblios 
Zebra authorities directory = /var/lib/koha/mylibrary/authorities 
Koha directory              = /usr/share/koha/intranet/cgi-bin 
Lockfile                    = /var/lock/koha/mylibrary/rebuild/rebuild..LCK 
BIBLIONUMBER in :     999$c 
BIBLIOITEMNUMBER in : 999$d 
================================ 
skipping authorities 
==================== 
exporting biblio 
==================== 
Records exported: 7922 
==================== 
REINDEXING zebra 
==================== 
18:04:12-13/11 zebraidx(8862) [warn] zebra_lock_create fail              fname=/var/lock/koha/mylibrary/biblios/norm..LCK [No such file or directory] 
18:04:12-13/11 zebraidx(8862) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/shadow..LCK [No such file or directory] 
18:04:12-13/11 zebraidx(8862) [fatal] Could not select database biblios errCode=109 
18:04:12-13/11 zebraidx(8863) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/norm..LCK [No such file or directory] 
18:04:12-13/11 zebraidx(8863) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/shadow..LCK [No such file or directory] 
18:04:12-13/11 zebraidx(8863) [fatal] Could not select database biblios errCode=109 
==================== 
CLEANING 
==================== 
Zebra configuration information 
================================ 
Zebra biblio directory      = /var/lib/koha/mylibrary/biblios 
Zebra authorities directory = /var/lib/koha/mylibrary/authorities 
Koha directory              = /usr/share/koha/intranet/cgi-bin 
Lockfile                    = /var/lock/koha/mylibrary/rebuild/rebuild..LCK 
BIBLIONUMBER in :     999$c 
BIBLIOITEMNUMBER in : 999$d 
================================ 
==================== 
exporting authority 
==================== 

Records exported: 0 
==================== 
REINDEXING zebra 
==================== 
skipping biblios 
==================== 
CLEANING 
==================== 

重新索引Zebra有什么问题?我该如何解决?我发现了一个与我相同的问题,但老实说,我不知道如何应用Patch.Here的链接:

zebraidx errCode=109

请修理它。我真的必须让这个工作。

3 个答案:

答案 0 :(得分:2)

在Centos中安装koha时发生了同样的事情。尝试:

Koha-rebuild-zebra -f -v -b mylibrary

您可以使用这些行重新启动搜索表。

sudo zebraidx -c /etc/koha/sites/library/zebra-biblios.cfg drop biblios
sudo zebraidx -c /etc/koha/sites/library/zebra-biblios.cfg commit 
koha-rebuild-zebra -b -r -v mylibrary
  • 最后:尝试更改首选项部分中的参数SearchEngine。斑马到索尔。

其他参数(source):

  • -f, --full是否对整个集合进行重新索引。即使USE_INDEXER_DAEMON =是,也会运行。
  • -a, --authorities仅运行授权记录的索引过程。
  • -b, --biblios仅运行biblio记录的索引过程。
  • -q, --quiet有时候脚本/ cronjobs会更安静。
  • -v, --verbose请详细说明。用于调试索引问题。

答案 1 :(得分:1)

您的所有上一步看起来都很棒 完成上述所有步骤之后,用户直到/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -x看起来很好 之后,您将提供以下命令 zebrasrv -f /path/to/the.KOHA_CONF文件,即xml文件应该在后台进程中运行,如果你获得注销索引也会关闭

答案 2 :(得分:0)

我有类似的问题,zebraserv似乎随机退出。日志没有多大帮助,因为它没有捕获导致崩溃的原因。症状是搜索不起作用。我发现重新启动koha可以解决问题。然而,一直重新启动并不理想。对我的系统进行了一些调查(Debian 8.3与Koha 16.05.05.000),显示zebraserv进程死亡是问题的症状。我写这个脚本是作为一个每60秒运行一次的cron作业(对于root)运行的。这似乎使它恢复。它似乎每隔几天发生一次。

这是通过Debian apt-get

在koha-common的最后几个版本中发生的

我叫它/root/check_zebra.sh .....它是

:
# Add this to cron i.e ( remove the leading "#" ) for root
# * * * * * /root/check_zebra.sh >> /root/check_zebra.log
#
ps ax | grep  zebrasrv | grep koha-conf.xml > /dev/null
status=$?
if [ $status = "0" ]
then
  :
else
  # Restart
  echo "============================================="
  date
  echo "zebrasrv has stopped. Restarting Koka..."
  echo "/etc/init.d/koha-common restart"
  /etc/init.d/koha-common restart
fi