How to Integrate Sphinx with MySQL

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

1, Sphinx can be MySQL’s storage engine

CREATE TABLE t1
(id INTEGER NOT NULL,
weight INTEGER NOT NULL,
query VARCHAR(3072) NOT NULL,
group_id INTEGER,
INDEX(query)
) ENGINE=SPHINX CONNECTION=”sphinx://localhost:3312/enwiki”;

SELECT * FROM enwiki.searchindex docs
JOIN test.t1 ON (docs.si_page=t1.id) InsertText
WHERE query=”one document;mode=any” limit 1;

2, How to configure Sphinx with MySQL

Sphinx engine/plugin is not full engine:
still need to run “searcher” daemon

Need to compile MySQL source with Sphinx to integrate it
MySQL 5.0: need to patch source code
MySQL 5.1: no need to patch, copy Sphinx plugin to plugin dir

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