Book Image

Sphinx Search Beginner's Guide

By : Abbas Ali
Book Image

Sphinx Search Beginner's Guide

By: Abbas Ali

Overview of this book

Table of Contents (15 chapters)
Sphinx Search
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Data sources


The source of the data that is to be indexed is called a data source. The data can generally come from very different sources such as SQL databases, plain text files, HTML documents, web services, mailboxes, and so on.

Sphinx cannot directly connect to a data source and fetch the required data. For different sources Sphinx requires different code to prepare the data for indexing. The code that does this job is called as data source driver (or data source for brevity).

Sphinx is available with pre-built data source drivers for MySQL and PostgreSQL databases. These drivers can connect to the database using Sphinx's native C/C++ API to run queries and fetch the data. The retrieved data is then indexed and stored in the indexes.

Another driver called xmlpipe2 (and xmlpipe which is now deprecated) is shipped with Sphinx. This driver executes the specified command and reads the data from its stdout. The data is expected in a predefined XML structure. This data source is very useful...