Skip to content

The integrated elasticlunr search can't work with language zh #1349

@t3link

Description

@t3link

Bug Report

Hello, I'm a Chinese user and fresh to Zola. According to the document, I build a Zola-zh from source (tag v0.13.0) locally to enable Chinese index. And I'm using a theme DeepThought which already support search function. However the javascript code runs error.

Uncaught Error: Cannot load un-registered function: trimmer-zh
    at elasticlunr.min.js:10
    at Array.forEach (<anonymous>)
    at Function.t.Pipeline.load (elasticlunr.min.js:10)
    at Function.t.Index.load (elasticlunr.min.js:10)
    at search (site.js:140)
    at HTMLInputElement.<anonymous> (site.js:212)
    at HTMLInputElement.dispatch (jquery-3.5.1.min.js:2)
    at HTMLInputElement.v.handle (jquery-3.5.1.min.js:2)

There are some bad things for elasticlunr.

  1. don't support Chinese and no longer be maintained.
  2. the offline search result seems kind of inaccurate...
  3. build time cost much. I've tested 10,000 short Chinese articles locally and the build progress even hanged.

Is there any idea to support other search service like algolia? Zola can just generate a simple structured json data filled with page title, content, tags and so on. Then on the user side, we import the json data to suitable search service using a deploy script or manually...

Thanks :d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions