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

Time for action - adding the delta index


  1. 1. Modify the configuration file, /usr/local/sphinx/etc/feeds.conf, and add the following (highlighted) code:

    source feeds
    {
    type = xmlpipe2
    xmlpipe_command = /usr/bin/php /path/to/webroot/feeds/makeindex.php
    xmlpipe_field = title
    xmlpipe_field = description
    xmlpipe_field = author
    xmlpipe_attr_timestamp = pub_date
    xmlpipe_attr_multi = category_id
    }
    source feeds-delta : feeds
    {
    }
    index feed-items
    {
    source = feeds
    path = /usr/local/sphinx/var/data/feed-items
    charset_type = utf-8
    }
    index feed-items-delta : feed-items
    {
    source = feeds-delta
    path = /usr/local/sphinx/var/data/feed-items-delta
    }
    indexer
    {
    mem_limit = 64M
    }
    
  2. 2. Run the indexer on feeds-items-delta index (as root):

    $ /usr/local/sphinx/bin/indexer c /usr/local/sphinx/etc/feeds.conf feed-items-delta
    
  3. 3. Run the command to merge the delta index with the main index:

    $ /usr/local/sphinx/bin/indexer c /usr/local/sphinx/etc/feeds.conf --merge feed-items feed-items-delta
    

What just happened?

We added...