Sphinx Search Engine for Zen Cart or OSCommerce

No GoodNeed ImprovementOKGoodExcellent (1 votes, average: 5 out of 5)
Loading ... Loading ...

Here are my ideas to make Sphinx search engine to work with Zen Cart.

1, Set up Sphinx

• Setup
./configure && make && make install
vi sphinx.conf
./indexer myindex
./searchd
• Usage
include ( “sphinxapi.php” );
$cl = new SphinxClient ();
$res = new $cl->Query ( “test”, “myindex” );

2, Create a denormalized table products_search:

CREATE TABLE `products_search` (
`products_id` int(11) NOT NULL auto_increment,
`products_model` varchar(32) default NULL,
`products_name` varchar(255) default ”,
`products_barcode` varchar(32) default NULL,
`manufacturers_name` varchar(50) default NULL,
`category_name` varchar(32) default NULL,
`keywords` varchar(255) default ”,
`synonyms` varchar(255) default ”
`products_description` text,
PRIMARY KEY (`products_id`)
) ENGINE=MyISAM CHARSET=utf8 ;

3, sphinx.conf



sql_query = SELECT products_id, products_name, products_barcode, manufacturers_name, category_name
FROM products_search
sql_attr_uint = products_id
sql_attr_uint = products_name
sql_attr_uint = products_barcode
sql_attr_uint = manufacturers_name
sql_attr_uint = category_name

4, PHP code

See http://www.sphinxsearch.com/wiki/doku.php?id=php_api_docs for example.

Ref:

http://re.search.wikia.com/

http://www.ibm.com/developerworks/library/os-php-apachesolr/index.html

http://www.ibm.com/developerworks/library/os-php-sphinxsearch/

http://drupal4hu.com/node/129

http://www.shroomery.org/forums/dosearch.php.txt

http://www.shroomery.org/forums/dosearch2.php.txt

http://www.scribd.com/doc/2670976/Sphinx-High-Performance-Full-Text-Search-for-MySQL-Presentation

Technorati :

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word