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 - creating a basic search script

  1. Add the searchd config section to /usr/local/sphinx/etc/sphinx-blog.conf:
    source blog {
    # source options
    }
    index posts {
    # index options
    }
    indexer {
    # indexer options
    }
    # searchd options (used by search daemon)
    searchd
    {
    listen = 9312
    log = /usr/local/sphinx/var/log/searchd.log
    query_log = /usr/local/sphinx/var/log/query.log
    max_children = 30
    pid_file = /usr/local/sphinx/var/log/searchd.pid
    }
    
  2. Start the searchd daemon (as root user):
    $ sudo /usr/local/sphinx/bin/searchd -c /usr/local/sphinx/etc/sphinx-blog.conf
    
    Time for action - creating a basic search script
  3. Copy the sphinxapi.php file (the class with PHP implementation of Sphinx API) from the sphinx ...

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