source search_index { # Change database information to match host, user, password and database # located in wp-config.php type = mysql sql_host = DATABASE HOST (usually 127.0.0.1) sql_user = DATABASE USER sql_pass = DATABASE PASSWORD sql_db = DATABASE NAME sql_sock = PATH TO SOCKET sql_port = DATABASE PORT (usually 3306) # make sure to replace wp_search_index with # YOUR_TABLE_PREFIX_search_index sql_query = \ SELECT \ id,object,title,content,post_date,parent,categories, \ author, protected, \ IF(type = 'post', 1, 0) as isPost, \ IF(type = 'comment', 1, 0) as isComment, \ IF(type = 'page', 1, 0) as isPage, \ UNIX_TIMESTAMP(post_date) AS post_date_ts \ FROM \ wp_search_index; sql_attr_bool = isPost sql_attr_bool = isComment sql_attr_bool = isPage sql_attr_uint = id sql_attr_uint = object } index search_index { source = search_index path = /home/wpsearch/sphinx/sphinx-source/data min_word_len = 3 min_prefix_len = 0 min_infix_len = 3 } searchd { port = 3312 # log = /home/wpsearch/sphinx/sphinx-source/logs/searchd.log # query_log = /home/wpsearch/sphinx/sphinx-source/logs/query.log # pid_file = /home/wpsearch/sphinx/sphinx-source/logs/searchd.pid }