O'Reilly logo

Sphinx Search by Abbas Ali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - adding code to perform a search query

  1. Modify the Sphinx configuration file /var/local/sphinx/etc/feeds.conf and add section for searchd:
    # Other options (not shown for brevity)
    index feed-items-delta : feed-items
    {
    source = feeds-delta
    path = /usr/local/sphinx/var/data/feed-items-delta
    }
    indexer
    {
    mem_limit = 64M
    }
    searchd
    {
    listen = 9312
    log = /usr/local/sphinx/var/log/feeds-searchd.log
    query_log = /usr/local/sphinx/var/log/feeds-query.log
    max_children = 30
    pid_file = /usr/local/sphinx/var/log/feeds-searchd.pid
    }
    
  2. Stop the searchd daemon (as root). You need to do this only if searchd is already running:
    $ /usr/local/sphinx/bin/searchd -c /path/to/sphinx.conf --stop
    
  3. Start the searchd daemon (as root):
    $ /usr/local/sphinx/bin/searchd ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required