https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41469

Anthony Zhu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Anthony Zhu <[email protected]> ---
Hi Nick,

Regarding the Elasticsearch implementation, my research findings (based on the
PDF documentation I shared previously) suggest that installing the plugins
alone might not be enough. We likely need to define a custom analyzer in the
Elasticsearch index settings to explicitly chain the tokenizer and the
conversion filter.

Here is the specific configuration logic derived from my research (Source:
"DeepSeek" analysis in my documentation) that might be the missing link:

1. Define Custom Analyzer (Elasticsearch API Approach) It seems we need to
update the index settings to include a custom analyzer that uses the ICU or
SmartCN tokenizer followed by a Traditional-to-Simplified transform filter.

JSON

/* Concept Configuration for Elasticsearch Index Settings */
PUT /koha_biblios
{
  "settings": {
    "analysis": {
      "filter": {
        "traditional_to_simplified": {
          "type": "icu_transform",
          "id": "Traditional-Simplified" 
          /* Or use stconvert if installed: "type": "stconvert",
"convert_type": "t2s" */
        }
      },
      "analyzer": {
        "zh_cn_search": {
          "tokenizer": "icu_tokenizer",  /* or smartcn_tokenizer */
          "filter": [
            "traditional_to_simplified",
            "lowercase"
          ]
        }
      }
    }
  }
}
2. Update Koha Search Mappings (search_fields.yaml) After defining the analyzer
in ES, we need to tell Koha to use this zh_cn_search analyzer for the relevant
fields (like Title, Author).

YAML

/* In Koha's search mappings */
title:
  type: text
  analyzer: zh_cn_search
  search_analyzer: zh_cn_search
3. Regarding the Zebra Config If Elasticsearch proves too difficult for now,
the Zebra ICU configuration I verified previously is:

koha-conf.xml: Enable <icu>1</icu> and <language>zh</language>.

ICU Rule: Use ::zh-Hans-zh-Hant; transliteration.

I hope these specific JSON snippets help clarify how to trigger the plugins!

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to