Sphinx Engine Installation

If you would like to use our extension with Sphinx Engine, you need to install it first.

Note

Warning: The minimum allowed sphinx engine version is 2.2.+

Installation includes a set of actions, that should be performed under root privileges. Actions can differ depending on selected platform. Here is the most used cases:

After installation run full reindex of Sphinx Engine indexes to fully enable your new search engine.

Installation on Ubuntu:

Execute from console/SSH under root privileges the following command:

sudo apt-get install sphinxsearch

Back to Top or proceed to Connection with Sphinx Engine

Installation on CentOS:

Execute from console/SSH under root privileges the following command:

sudo yum install sphinxsearch

Back to Top or proceed to Connection with Sphinx Engine

Installation with Stemmer (with language specific morphology)

In order to install Sphinx with Stemmer, run the following commands from console/SSH under root privileges:

  • wget http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
  • tar xvf sphinx-2.2.11-release.tar.gz
  • cd sphinx-2.2.11-release
  • wget http://snowball.tartarus.org/dist/libstemmer_c.tgz
  • tar xvf libstemmer_c.tgz
  • ./configure --with-libstemmer
  • make
  • make install
  • Learn more about Libstemmer morphology

    Libstemmer controls which characters are accepted as valid and which are not, and how the accepted characters should be transformed (eg. should the case be removed or not).

    If charset table is configured for special language chars, then search phrases "kottkvarn" and "köttkvarn" will return the same result.

    Libstemmer supports morphology of the following languages:

    • Danish
    • Dutch
    • English
    • Finnish
    • French
    • German
    • Hungarian
    • Italian
    • Norwegian
    • Porter
    • Portuguese
    • Romanian
    • Russian
    • Spanish
    • Swedish
    • Turkish

To configure morphology and charset tables for additional languages, perform the following actions:

  • Open file /vendor/mirasvit/module-search-sphinx/src/SearchSphinx/etc/conf/index.conf.
  • Configure morphology variable. Standard language codes you can find here. Use two-letter codes from 639-1 column.

    Tip

    For example, to add German to the list of supported languages, you need to set in index.conf:

    morphology = stem_enru, libstemmer_de

    Read more about morphology here.

  • Add charsets to the charset_table variable. List of codes for different charset tables can be found here

    Tip

    For example, to add English and Russian characters, variable should look as shown below:

    charset_table = 0..9, A..Z->a..z, _, a..z, \
                    U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+451, U+451

    Read more about character tables here.

Back to Top or proceed to Connection with Sphinx Engine

Manual installation

In some cases automatic installation either does not start, or even is not possible. Then you can manually install Sphinx:

  • wget http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
  • tar xvf sphinx-2.2.11-release.tar.gz
  • cd sphinx-2.2.11-release
  • ./configure
  • make
  • make install

Configuration file will be generated automatically.

Back to Top or proceed to Connection with Sphinx Engine