6.1. Sphinxse Overview
Sphinxse is a MySQL storage engine that can be compiled into the MySQL 5.x version, leveraging the MySQL plug-in architecture of that version. Sphinxse cannot be used in the MySQL 4.x series, it requires MySQL 5.0.22 or later, or MySQL 5.1.12 or later.
Although called the "storage Engine," SPHINXSE does not actually store any data. It is actually an embedded client that allows the MySQL server to interact with SEARCHD and get search results. All indexes and searches take place outside of MySQL.
Obviously, the sphinxse applies to:
? enable the porting of MySQL FTS applications to Sphinx
? Those languages that do not have the Sphinx API can also use Sphinx
Provide optimizations when you need to do extra processing on the Sphinx result set on the MySQL side (for example, extra filtering on the original document table Join,mysql)
6.2. Install Sphinxse
You need to get a copy of MySQL source code and recompile MySQL. MySQL source code (MYSQL-5.X.YY.TAR.GZ) can be obtained from the dev.mysql.com website.
For some versions of the Mysql,sphinx Web site, a patched tarballs package containing support Sphinxse is provided. By extracting these files and replacing the original files, you can configure (configure), build to generate MySQL with built-in Shpinx support.
If there is no corresponding version of Tarballs on the site, or if for some reason it is not working, you may need to prepare these files by hand. You need an installed gun Autotools framework (Autoconf,automake and Libtool) to complete this task.
6.2.1. Compiling sphinxse on MySQL 5.0.x
If you use a patched tarballs that we made beforehand, skip step 1-3
1. Copy the Sphinx5.0.yy.diff patch file to the MySQL source directory and run
Patch-p1 < Sphinx.5.0.yy.diff
If you don't have a. diff file that exactly matches your MySQL version, try one of the closest version of the. diff file. Ensure the smooth application of the patch, no rejects.
2. Running in MySQL source directory
SH build/autorun.sh
3. Create the Sql/sphinx directory in the MySQL source directory and copy all files from the Mysqlse directory in the Sphinx source directory to this directory.
cp
-r/root/builds/sphinx-0.9.7/mysqlse/root/builds/mysql-5.0.24/sql/sphinx
4. Configuration (Configure) MySQL, enable Sphinx engine
./configure--with-sphinx-storage-engine
5. Build and install MySQL
Make
Make install
6.2.2. Compiling sphinxse on MySQL 5.1.x
If you use a patched tarballs that we made beforehand, skip step 1-3
1. Create the Storage/sphinx directory in the MySQL source directory and copy all files from the Mysqlse directory in the Sphinx source directory to this directory.
cp
-R/ROOT/BUILDS/SPHINX-0.9.7/MYSQLSE/ROOT/BUILDS/MYSQL-5.1.14/STORAGE/SPH Inx
2. mysql Source directory run
SH build/autorun.sh
3. Configuration (Configure) MySQL, enable Sphinx engine
./configure--with-plugins=sphinx
4. Build and install MySQL
Make
Make install