Computer
Sphinx Search Beginner’s Guide - Abbas Ali, 244 Pages
- This book is a step-by-step guide for an absolute beginner. It covers everything, from installing to configuring, to get you started quickly. It has numerous code examples that the reader can try on their own and learn while doing so. It has two full-fledged applications as examples that readers can follow. This book is specifically focused on the Search feature of web applications. This book is for developers who are new to Sphinx Search. All code examples use PHP but the logic is same for any other web scripting languages as well.
- Sphinx 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. 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... It also deals with how to modify configuration, from sources to Sphinx API specific parameters, change or extend the charset tables.. My complains about this book are two:
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).
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?
To compensate a bit for those complains, we'r explained a few interesting and non-basic concepts: How to setup distributed indexes (distributed among multiple sphinx servers). 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. The book ends with a brief introduction to SphinxQL, to use it from MySQL if you feel more confortable writing SQL queries. 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.
- A disturbing point about this book is that it shows (or claims to show) that the popular MySql has a very slow implementation of full text searching. I thought that MySql would have a fairly efficient coding. But Ali describes how the creator of Sphinx was able to demonstrate that in some types of full text searching, Sphinx ran up to 100 times faster. The most germane section of the book is the table at the end of Chapter 2, which has a comparison between MySql, Lucene and Sphinx. Where Lucene is, like Sphinx, an external engine that sits on top of MySql.
Assuming that the results of that table are generally true [and I did not independently verify this], then you have compelling evidence for migrating to Sphinx if you run a MySql database and want fast full text searching.
One neat aspect of the book is that in several chapters, where different topics are explored, the chapters commence with a list of the tools used, along with their versions. So for one chapter, we have PHP 5.3.2, Apache 2.2.14, MySql 5.1.14, Sphinx 0.9.9, phpMyAdmin, Ubuntu 10.04 LTS, Firefox 3.6 and SimplePie 1.2+. The explicit nature is useful, if you want to replicate the results. It also shows how the promise of open source packages being interoperable is coming true. But, and I must say this, if you have any experience with such things, it also suggests potential pitfalls when your configuration is dependent on some many different packages and often too on the specific versions of those.
|
Nguồn
|
: Internet |
|
Tác giả
|
: Abbas Ali |
|
Kiểu tập tin
|
: PDF |
|
Độ lớn tập tin
|
: 6MB |
|
Đăng bởi
|
: Thanh Ngoc |
|
Cập nhật
|
: 30.11.2011 |
|
Số lượt xem
|
: 267 |
|
Số lượt tải
|
: 6 |
Bạn phải đăng nhập mới có thể download
Các tin liên quan mới nhất: