如何用Elasticsearch in Koha 18.11在中文的書籍

122 views
Skip to first unread message

C P Hong

unread,
Feb 12, 2019, 10:16:45 PM2/12/19
to Koha 臺灣
有一個問題請教大家。

如何用Elasticsearch in Koha 18.11在中文的書籍? 我裝Elasticsearch Koha 18.11, 但不能找中文的書籍。

謝謝!

C Hong

mao

unread,
Feb 16, 2019, 12:18:38 AM2/16/19
to Koha 臺灣
請問:可以檢索英文書籍嗎?
通常最有可能沒有建立索引

建立索引程式:
$ sudo misc/search_tools/rebuild_elastic_search.pl -v -d


C P Hong於 2019年2月13日星期三 UTC+8上午11時16分45秒寫道:

C P Hong

unread,
Feb 17, 2019, 6:11:16 AM2/17/19
to kohat...@googlegroups.com
我已執行
$ sudo misc/search_tools/rebuild_elastic_search.pl -v -d

可以找英文書。 中文書找不到, no result.

--
群組首頁, http://groups.google.com.tw/group/kohataiwan
取消訂閱, 請寄電子郵件至 kohataiwan-...@googlegroups.com
張貼留言, 請寄電子郵件至 kohat...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Koha 臺灣" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kohataiwan+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Wong

unread,
Feb 18, 2019, 8:20:11 AM2/18/19
to kohat...@googlegroups.com
請參考:

我按照以下步驟:

=====

Install ICU (unicode library from IBM)     sudo apt-get install yaz-icu


Set Koha Global System Preferences:

UseICU: Use

QueryFuzzy: Don't try QueryStemming: Don't try


Activate it by editing default.idx file    sudo leafpad /etc/koha/zebradb/etc/default.idx


# Traditional word index
# Used if completenss is 'incomplete field' (@attr 6=1) and
# structure is word/phrase/word-list/free-form-text/document-text
index w
completeness 0
position 1
alwaysmatches 1
firstinfield 1
# Replaced this line ==>> # charmap word-phrase-utf.chr
icuchain words-icu.xml

# Phrase index
# Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
# and structure is word/phrase/word-list/free-form-text/document-text
index p
completeness 1
firstinfield 1
# Replaced this line ==>> # charmap word-phrase-utf.chr
icuchain words-icu.xml

sudo leafpad /etc/koha/zebradb/etc/words-icu.xml - Replace file contents with (reference):


<icu_chain locale="zh_TW.UTF-8">
 <transliterate rule="\'>\ "/>
 <transliterate rule="[:Number:] { '-' > '' "/>
 <transform rule="[:Control:] Any-Remove"/>
 <tokenize rule="l"/>
 <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
 <transform rule="NFD"/>
 <transform rule="[:Nonspacing Mark:] Remove"/>
 <transform rule="NFC"/>
 <display/>
 <casemap rule="l"/>
</icu_chain>

Koha-restart-zebra {instance}

koha-rebuild-zebra -v -f {instance}


=====

David

David Wong

unread,
Feb 18, 2019, 8:20:11 AM2/18/19
to kohat...@googlegroups.com
對不起,以上信息只是關於Zebra。

David

C P Hong

unread,
Oct 5, 2019, 6:05:58 PM10/5/19
to Koha 臺灣
請問這裡有人用中文的Koha圖書系統的ElasticSearch?如有,請告知。謝謝!

On Sunday, February 17, 2019 at 6:11:16 AM UTC-5, C P Hong wrote:
我已執行
$ sudo misc/search_tools/rebuild_elastic_search.pl -v -d

可以找英文書。 中文書找不到, no result.

On Sat, Feb 16, 2019 at 12:18 AM mao <mao...@gmail.com> wrote:
請問:可以檢索英文書籍嗎?
通常最有可能沒有建立索引

建立索引程式:
$ sudo misc/search_tools/rebuild_elastic_search.pl -v -d


C P Hong於 2019年2月13日星期三 UTC+8上午11時16分45秒寫道:
有一個問題請教大家。

如何用Elasticsearch in Koha 18.11在中文的書籍? 我裝Elasticsearch Koha 18.11, 但不能找中文的書籍。

謝謝!

C Hong

--
群組首頁, http://groups.google.com.tw/group/kohataiwan
取消訂閱, 請寄電子郵件至 kohataiwan-unsubscribe@googlegroups.com

張貼留言, 請寄電子郵件至 kohat...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Koha 臺灣" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kohataiwan+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages