This extension integrates Sphinx Search with any Magento installation.
Based on Gfe/SphinxSearch with a few key improvements.
Tested on Magento CE 1.9.1.0
sphinx.conf.sample
to suit your needssearchd
commandBy default, Magento chucks all searchable attributes into one fulltext column on the catalogsearch_fulltext index, so you might end up with something like the following:
fulltext_id | product_id | store_id | data_index |
---|---|---|---|
940753 | 225439 | 9 | CPU Desc etc |
And magento just does a fulltext search against the data_index column with no weighting on any attributes and also includes things like weight, price, etc.
Sphinx Search overrides the fulltext index and creates a new index table that looks more akin to the following:
product_id | store_id | name | name_attributes | category | sku | data_index | |
---|---|---|---|---|---|---|---|
12345678 | 9 | CPU | 3GHz CPU | Some | Category | Foo | CPU Desc Etc |
Spinx then creates its own index based on this table and stores it away. The most important parts of this table are the three extra columns name, name_attributes, sku and category.
Using the magento backend, we can assign weights to these columns in terms of ranking search results.
The sphinx server is configured using the file /var/sphinx/sphinx.conf on Linux (tested on CentOS) and contains all sorts of goodies.
Sphinx search has several, much cleverer algorithms for performing searches. A short list of (enabled) features include:
As well as many other behind the scenes stuff. It also ranks searches higher when words appear at the beginning of a field.
For example, a search for ‘Dog’ puts 'dog kennel' before 'log dog'.
Sphinx won't work! It keeps saying I don't have permission to do whatever!
My searches are return irrelevant results!
Change which attributes are chosen or play with the weights.