After installed successfully SphinxSearch service, the service will now be listed in the Services panel within the Management Console, available from Administrative Tools. If you right click SphinxSearch and click Start, you may get the error message below:
--------------------------- Services --------------------------- Windows could not start the SphinxSearch service on Local Computer. Error 1067: The process terminated unexpectedly. --------------------------- OK --------------------------- |
To start this SphinxSearch service, you will need to configure it and build your indexes with indexer.
d:\dev\sphinx\bin>indexer -c D:\dev\sphinx\sphinx.conf test1 |
My example sphinx.conf content
source src1 { type = mysql sql_host = localhost sql_user = root sql_pass = sql_db = test sql_port = 3306 # optional, default is 3306 sql_query = \ SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \ FROM documents sql_attr_uint = group_id sql_attr_timestamp = date_added sql_query_info = SELECT * FROM documents WHERE id=$id } index test1 { source = src1 path = D:/dev/sphinx/data/test1 docinfo = extern charset_type = sbcs } indexer { mem_limit = 32M } searchd { port = 9312 log = D:/dev/sphinx/log/searchd.log query_log = D:/dev/sphinx/log/query.log read_timeout = 5 max_children = 30 pid_file = D:/dev/sphinx/log/searchd.pid max_matches = 1000 seamless_rotate = 1 preopen_indexes = 0 unlink_old = 1 } |
Note:
+ change mysql login detail as well as the file location to your environment
+ create folder data and log in the sphinx directory, if they aren’t existed.