Sphinx Installation Overview

Sphinx installation is straightforward and typically includes the following steps:

1. Building the programs from sources:
$ configure && make && make install

2. Creating a configuration file with definitions for data sources and full-text indexes

3. Initial indexing

4. Launching searchd

After that, the search functionality is immediately available for client programs:

Query ( 'test query', 'myindex' );
// use $res search result here
?>

The only thing left to do is run indexer regularly to update the full-text index data. Indexes that searchd is currently serving will stay fully functional during reindexing: indexer will detect that they are in use, create a “shadow” index copy instead, and notify searchd to pick up that copy on completion.

Full-text indexes are stored in the filesystem (at the location specified in the configuration file) and are in a special “monolithic” format, which is not well suited for incremental updates. The normal way to update the index data is to rebuild it from scratch. This is not as big a problem as it might seem, though, for the following reasons:

• Indexing is fast. Sphinx can index plain text (without HTML markup) at a rate of 4–8 MB/sec on modern hardware.

• You can partition the data in several indexes, as shown in the next section, and reindex only the updated part from scratch on each run of indexer.

• There is no need to “defragment” the indexes—they are built for optimal I/O, which improves search speed.

• Numeric attributes can be updated without a complete rebuild.

A future version will offer an additional index backend, which will support real-time index updates.

Source of Information : OReIlly High Performance MySQL Second Edition

0 comments


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner