深入配置 sphinx

阅读更多

加上了 ,配置文件是最好的说明~_~ 哈哈

# 2 goods source goods { type = mysql sql_host = localhost sql_user = asdf sql_pass = asdf sql_db = sdf sql_port = 3306 # optional, default is 3306 #sql_sock = /tmp/mysql.sock sql_query_pre = SET NAMES gbk sql_query_pre = SET SESSION query_cache_type=OFF sql_query_pre = REPLACE INTO search_counter SELECT 1,MIN(id),MAX(id) FROM p8_fenlei_content sql_query_range = SELECT min_doc_id,max_doc_id FROM search_counter WHERE id = 1 sql_range_step = 1000 sql_query = SELECT ct.id,ct.title,ct.fid,ct.posttime,c6.content,c6.my_hownew from p8_fenlei_content_6 c6,p8_fenlei_content ct WHERE c6.id=ct.id AND ct.id>$start AND ct.id<$end #sql_attr_uint = id sql_attr_uint = fid sql_attr_timestamp = posttime } source deltagoods { type = mysql sql_host = localhost sql_user = sd sql_pass = asdf sql_db = sadf sql_port = 3306 # optional, default is 3306 #sql_sock = /tmp/mysql.sock sql_query_pre = SET NAMES gbk sql_query_pre = SET SESSION query_cache_type=OFF sql_query_range = SELECT max_doc_id,max_doc_id+100000 FROM search_counter WHERE id = 1 sql_range_step = 1000 sql_query = SELECT ct.id,ct.title,ct.fid,ct.posttime,c6.content,c6.my_hownew from p8_fenlei_content_6 c6,p8_fenlei_content ct WHERE c6.id=ct.id AND ct.id>$start AND ct.id<$end #sql_attr_uint = id sql_attr_uint = fid sql_attr_timestamp = posttime sql_query_post = REPLACE INTO search_counter SELECT 1,MIN(id),MAX(id) FROM p8_fenlei_content } index goods { source = goods path = /var/searchd/data/goods docinfo = extern charset_type = zh_cn.gbk #min_prefix_len = 0 #min_infix_len = 2 #ngram_len = 2 charset_dictpath = /var/searchd/mmseg #min_prefix_len = 0 #min_infix_len = 0 #min_word_len = 2 } index deltagoods { source = deltagoods path = /var/searchd/data/deltagoods docinfo = extern charset_type = zh_cn.gbk #min_prefix_len = 0 #min_infix_len = 2 #ngram_len = 2 charset_dictpath = /var/searchd/mmseg #min_prefix_len = 0 #min_infix_len = 0 #min_word_len = 2 } indexer { mem_limit = 128M } searchd { #listen = 3312 log = /var/log/searchd.log query_log = /var/log/query.log read_timeout = 5 max_children = 30 pid_file = /var/log/searchd.pid max_matches = 1000 #seamless_rotate = 1 #preopen_indexes = 0 #unlink_old = 1 }

你可能感兴趣的:(SQL,MySQL,Cache)