cyrillic symbols in search

DEV's Avatar

DEV

17 Oct, 2018 03:05 PM

Hello. How I can setup sphinx search for Cyrillic symbols? where can I add those settings?
I dont see a generated fileproduction.sphinx.conf`
thank you.

  1. Support Staff 1 Posted by Pat Allan on 17 Oct, 2018 09:35 PM

    Pat Allan's Avatar

    Indexed characters are managed through the charset_table and (prior to Sphinx 2.2) charset_type. Here is Sphinx's documentation for v2.1.8 (which I believe you are using):
    http://sphinxsearch.com/docs/archives/2.1.8/conf-charset-type.html
    http://sphinxsearch.com/docs/archives/2.1.8/conf-charset-table.html

    In Thinking Sphinx, these settings are managed in a per-environment manner within config/thinking_sphinx.yml - similar to config/database.yml. The default settings should actually work fine with Cyrillic characters, but I think the issue here is that Thinking Sphinx now expects Sphinx v2.2.x by default (which uses UTF-8 automatically and has deprecated charset-type). To explicitly set that, add the following to your config/thinking_sphinx.yml file:

    production:
      charset_type: "utf-8"
    

    I would recommend using Sphinx 2.2.11 instead, though - and this is also managed in config/thinking_sphinx.yml:

    production:
      version: 2.2.11
    

    Once you've made either of these changes, you'll want to run rake ts:rebuild to ensure the data is re-indexed accordingly.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac