OpenWebSpider and Sphinx Search Engine

Do you need a really powerful search engine?
MySQL full-text index is quite good and supports interesting features to make a reasonably fast search engine but, if you are looking for something more, well, nothing is better and faster than Sphinx.



Let’s see how to configure the Sphinx Search Server (engine) to work with an existing OpenWebSpider index.

  1. download Sphinx: http://sphinxsearch.com/ and copy it in “c:\sphinx\” (this tutorial refers to sphinx-2.2.8-release-win32)
  2. copy the thisĀ configuration file in “C:\sphinx\bin”
  3. create the following folders: “C:\sphinx\data” and “C:\sphinx\logs”
  4. from “C:\sphinx\bin”: execute
    indexer.exe –allsphinx indexer
  5. execute the Search Engine Server:
    searchd.exesphinx searchd
  6. the search server now listens to the TCP port 9306 and accepts connections from any MySQL client (or library):
    mysql.exe -P9306
  7. you can perform searches with a query like:
    SELECT *, WEIGHT() FROM ows_index WHERE MATCH(‘test query’);sphinx mysql search

 

You may also like...