Advanced Sphinx Search Pro

User Manual, v. 2.2.8

Extension Installation

For extension installation you need to follow next steps:

  • Login to Magento backend.
  • Disable compilation for Magento 1.4+. To do this go to System > Tools > Compilations. If Compiler Status is Enabled, then disable the compilation by clicking the button Disable in the upper right corner. This step eliminates almost all potential problems. It's necessary since Magento uses cache heavily. After installation of extension, you can enable compilation again.
  • Backup your store database and web directory.
  • Download extension from your Personal Account.
  • Unzip the extension locally
  • Copy contents of the folder "step1" to the root directory of Magento store
  • Copy contents of the folder "step2" to the root directory of Magento store
  • Completely clear the site cache. Go to System > Cache Management. Click button Flush Magento Cache.
  • If you want to clear the cache manually, you need to remove at the server a folder /var/cache.
  • Logout from Magento backend and login again.

Configuration of search indexes

Catalog Product Index

After installation, you first need to configure the search indexes. Go to System > Configuration > Mirasvit Extensions > Search Index

System > Configuration > Mirasvit Extensions > Search Index > Catalog Product Index

  • Title - title of search index (displayed in tab)
  • Attributes - for each searchable attribute you can set own weight. Different weights indicate the importance of each attribute for product relevancy
  • Include category names path to product search index - if option enabled, product will be found by category name too
  • Include product tags to search index - if option enabled, product will be found by tag name too

Catalog Category Index

System / Configuration / Search Index / Catalog Category Index

  • Enabled - if enabled, search index will be displayed in search results
  • Title - title of search index (displayed in tab)
  • Attributes - for each attribute you can set own weight. Different weights indicate the importance of each attribute for product relevancy. All attributes which have to search, to be chosen
  • Position - position tab to display

Sphinx Search Configuration

General Settings

For configure search go to System > Configuration > Mirasvit Extensions > Sphinx Search

System / Configuration / Sphinx Search / General Settings

  • Full Reindex Cron Regular Expr - sets the frequency of full re-indexing. Set up the frequency in the format: * * * * *, where: * 1 * 2 * 3 * 4 * 5: 1 - minute, 2 - hour, 3 - day 4 - month, 5 - year
  • Delta Reindex Cron Regular Expr - sets the frequency of delta re-indexing (reindex only changes). Set up the frequency in the format: * * * * *, where: * 1 * 2 * 3 * 4 * 5: 1 - minute, 2 - hour, 3 - day 4 - month, 5 - year

Advanced Settings

System / Configuration / Sphinx Search / Advanced Settings

  • Match Mode - indicates where to search for a match. There are the following matching modes available:
    • Matches all query words
    • Matches any of the query words
    • Matches query as a phrase, requiring perfect match
    • Matches query as a boolean expression
    • Matches query as an expression in Sphinx internal query language - default mode
  • Sphinx Host - host where the Sphinx is running, the default setting should be left
  • Sphinx Port - uses any free port number, the default setting should be left
  • Sphinx Bin Path - path to Sphinx searchd deamon (leave it blank for default or find it using shell command "which searchd")
  • Stopwords stopwords are the words that will not be indexed. Typically you'd put most frequent words in the stopwords list because they do not add much value to search results
  • Synonyms - synonyms allow to map one or more tokens (including tokens with characters that would normally be excluded) to a single keyword

Manage Sphinx Deamon

Extension supports two types of search engines:

  • Built-in search engine
  • External search engine - option available if sphinx search engine founded on server

Extension Disabling

To temporary disable extension please follow the next steps:

  • Disable Compilation Mode (if enabled).
  • Rename the file "app/etc/modules/Mirasvit_[ExtensionName].xml" to "app/etc/modules/Mirasvit_[ExtensionName].xml.bak".
  • Login in to Magento back-end and refresh site cache (if enabled).

To uninstall extension please follow the next steps:

  • Disable Compilation Mode (if enabled).
  • Rename the file "app/etc/modules/Mirasvit_[ExtensionName].xml" to "app/etc/modules/Mirasvit_[ExtensionName].xml.bak".
  • Login in to Magento back-end and refresh site cache (if enabled).
  • Remove all the extension files of the extension from folder "app/code/local/Mirasvit/[ExtensionName]".
  • Remove templates and layouts files of extension from your theme folder. List of such files can be collected from files in the extension package.

Additionally

Sphinx Search Engine Installation

Extension supports two types of search engines:

  • Built-in search engine
  • External search engine (Sphinx) - more preferred if you have large number skus in catalog (> 10 000)

For using External search engine you need install Sphinx Search Engine

Download Sphinx

Download the latest stable version of the engine for your server from the developers website http://sphinxsearch.com/downloads/release/

Installation Sphinx for Linux

The following describes the installation process for Source tarball (tar.gz). If you do not install the Sphinx from the source, then you will need after installing the Sphinx server to install dependencies via the manager of OS packages.

Install Source tarball

Extract everything from the distribution tarball (haven't you already?) and go to the sphinx subdirectory. (We are using version sphinx-2.0.6-release here for the sake of example only; be sure to change this to a specific version you're using.)

$ tar xzvf sphinx-2.0.6-release.tar.gz
$ cd sphinx

Run the configuration program:

$ ./configure

There's a number of options to configure. The complete listing may be obtained by using --help switch. The most important ones are:

  • --prefix, which specifies where to install Sphinx; such as
  • --prefix=/usr/local/sphinx (all of the examples use this prefix)
  • --with-mysql, which specifies where to look for MySQL include and library files, if auto-detection fails;
  • --with-pgsql, which specifies where to look for PostgreSQL include and library files.

Build the binaries:

$ make

Install the binaries in the directory of your choice: (defaults to /usr/local/bin/ on *nix systems, but is overridden with configure --prefix)

$ make install

Setting up CRON Job

Cron jobs, or scheduled tasks, must be enabled in order for Magento to operate properly.

By default if you're running a UNIX operating system it should automatically recognize Magento's requests to use the CRON TAB service. Magento needs Cron Jobs to be initiated for the following features to operate correctly:

  • Catalog Price rules
  • Sending Newsletters
  • Generating Google Sitemaps
  • Customer Alerts/Notifications (product price change, product back to stock)
  • Automatic updating of currency rates
  • Scheduled DB logs cleanup
  • For our extensions:
    • Fast Asynchronous Re-indexing
    • Asynchronous Cache
    • Advanced Sphinx Search Pro
    • Sphinx Search Ultimate

Setting up the Cron In a UNIX Based Operating System

You can use the crontab service command if you have shell access to the server, or add it through your cPanel or similar admin. You need to make the script run every minute, so in advanced configurations you'd be entering in:

* * * * *

Your crontab should have something like one of these:

* * * * * /bin/sh /[mage_dir]/cron.sh
* * * * * /bin/bash /[mage_dir]/cron.sh
* * * * * /usr/bin/php /[mage_dir]/cron.php
* * * * * /usr/local/bin/php -f /[mage_dir]/cron.php


Support

Please, send your questions to support@mirasvit.com. We are always happy to help you.