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

Sphinx configuration file


Sphinx has to be configured before we can start using it to create indexes or search. This is done by creating a special configuration file that Sphinx reads while creating an index and searching. The configuration file can be placed anywhere in the file system. The file contains options written in a special format as follows:

section_type1 name {
option11 = value11
option12 = value12
option13 = value13
}
section_type2 name {
option21 = value21
option22 = value22
option23 = value23
}

Each section has a name and some options, as seen in the previous code snippet. A configuration file can have the following types of sections:

  • source: Defines the source to fetch the data to be indexed

  • index: Defines the index properties such as where to save, which charset to use, and so on

  • indexer: Specifies options to be used by the indexer utility

  • searchd: Defines the properties of the search daemon, that is, the Sphinx API

Rules for creating the configuration file

What follows...