Can't search alphabetical words on the HTML quick search generated with language='ja'

Takayuki Shimizukawa avatarTakayuki Shimizukawa created an issue

Search feature with language='ja' generate broken 'searchindex.js' file. Japanese words are OK, but alphabetical words prefixed with a whitespace.

This issue reported by https://groups.google.com/d/msg/sphinx-users/1z4Y083Z-9o/fst4kXZAPkAJ

conf.py:

language='ja'

index.rst:

It's a beautiful day.

searchindex.js:

Search.setIndex({envversion:42,terms:{" beautiful":0, ...}})

It caused by sphinx.search.ja.TinySegmenter.split() method.

Comments (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.