Title: Book Review: Sphinx Search - Beginner's Guide
Slug: book-review-sphinx-search-beginner-s-guide
Date: 2011-05-08 15:23:00
Author: Kartones
Lang: en
Tags: Reviews, Books, Sphinx, Databases
og_image: https://images.kartones.net/posts/screenshots/book_sphinx_packt.jpg
Description: A review of the book 'Sphinx Search - Beginner's Guide', by Abbas Ali.

<p>I've finished reading another book, in this case not about web development, related instead with searching.</p>

<p>Note: Free evaluation copy provided by the publisher.</p>

<h3>Review</h3>

<p><img alt="Sphinx Search Beginner's Guide" src="https://images.kartones.net/posts/screenshots/book_sphinx_packt.jpg"></p>

<p>
<b>Title</b>: <a href="http://www.packtpub.com/sphinx-search-beginners-guide/book" rel="nofollow">Sphinx Search Beginner's Guide</a><br>
<b>Author</b>: Abbas Ali</p>

<p><a href="http://sphinxsearch.com/" rel="nofollow">Sphinx</a> is an opensource search engine
that instead of doing real-time searches, works by building indexes of the data
and then allowing really fast search operations using those indexes.
</p>

<p>This book explains all basics (including setup), then goes into deep detail
of searching: modes, modifiers, attributes, filters (both basic and
advanced/low-level), grouping, indexing and delta indexing...
</p>

<p>It also deals with how to modify configuration, from sources to Sphinx API
specific parameters, change or extend the charset tables..
</p>

<p>My complains about this book are two:
</p>

<ol>
<li>From 244 pages it has around 100 of two PHP examples. Having a "full PHP
website example" is ok, but two of them looks more like "page filling" than real
interest on explaining concepts (both could just be combined).</li>

<li>And more importantly, the author seems to deriberately avoid complex stuff
like partial word matches: For example, how does Sphinx matches "Ser" or "Serg"
or "Sergi" if we have indexed "Sergio"? Do them all get the same weight for the
result? What happens with each different SPH_MATCH_xxx machting mode?</li>
</ol>

<p>To compensate a bit for those complains, we'r explained a few interesting and
non-basic concepts:
</p>

<ul>
<li>How to setup distributed indexes (distributed among multiple sphinx
servers).</li>

<li>How the morphology works, how to use it for stemming (reducing a word to
their stem) and how the morphologic processor works in sphinx. This is not used
by default so is a good addition. It even mentions "wordforms", mappings of
words to handle synonyms.</li>
</ul>

<p>The book ends with a brief introduction to SphinxQL, to use it from MySQL if
you feel more confortable writing SQL queries.
</p>

<p>So, overall you get a really good view of how this search engine works,
including some advanced topics. It just lacks more depth in some of the
explained subjects instead of so many (trivial) examples.</p>