diff --git a/plugins/sphinx/tpl/simdht_delta.conf b/plugins/sphinx/tpl/simdht_delta.conf index 379b26d58..3430cdeab 100755 --- a/plugins/sphinx/tpl/simdht_delta.conf +++ b/plugins/sphinx/tpl/simdht_delta.conf @@ -4,23 +4,23 @@ indexer { - mem_limit = 32M + mem_limit = 128M } searchd { listen = 9312 listen = 9306:mysql41 - log = {$SERVER_APP}/index/searchd.log - query_log = {$SERVER_APP}/index/query.log + log = /www/server/sphinx/index/searchd.log + query_log = /www/server/sphinx/index/query.log read_timeout = 5 max_children = 0 - pid_file = {$SERVER_APP}/index/searchd.pid + pid_file = /www/server/sphinx/index/searchd.pid seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 #workers = threads # for RT to work - binlog_path = {$SERVER_APP}/index/binlog + binlog_path = /www/server/sphinx/index/binlog } source search_hash @@ -39,9 +39,7 @@ source search_hash sql_range_step = 1000 sql_query_pre = SET NAMES utf8 - sql_query = \ - SELECT id, name, CRC32(category) AS category, length, UNIX_TIMESTAMP(create_time) AS create_time, UNIX_TIMESTAMP(last_seen) AS last_seen\ - FROM search_hash where id >= $start AND id <= $end AND is_has=1 + sql_query = SELECT * from ( SELECT s1.id id, s1.name name, s1.category category, s1.length length, UNIX_TIMESTAMP(s1.create_time) as create_time, UNIX_TIMESTAMP(s1.last_seen) as last_seen, s2.file_list file_list, s1.info_hash info_hash FROM search_hash s1 left join search_filelist s2 on s1.info_hash=s2.info_hash where s1.is_has=1 and s1.id >= $start AND s1.id <= $end ) as s WHERE s.file_list is not null sql_attr_bigint = length sql_attr_timestamp = create_time @@ -53,7 +51,7 @@ source search_hash_delta : search_hash { sql_query_range = SELECT (SELECT max_doc_id FROM `sph_counter` where counter_id=1) as min, (SELECT max(id) FROM search_hash) as max sql_query_pre = SET NAMES utf8 - sql_query = SELECT id, name, CRC32(category) AS category, length, UNIX_TIMESTAMP(create_time) AS create_time, UNIX_TIMESTAMP(last_seen) AS last_seen FROM search_hash where id >= $start AND id <= $end AND is_has=1 + sql_query = SELECT * from ( SELECT s1.id id, s1.name name, s1.category category, s1.length length, UNIX_TIMESTAMP(s1.create_time) as create_time, UNIX_TIMESTAMP(s1.last_seen) as last_seen, s2.file_list file_list, s1.info_hash info_hash FROM search_hash s1 left join search_filelist s2 on s1.info_hash=s2.info_hash where s1.is_has=1 and s1.id >= $start AND s1.id <= $end ) as s WHERE s.file_list is not null sql_attr_bigint = length sql_attr_timestamp = create_time sql_attr_timestamp = last_seen @@ -65,7 +63,7 @@ source search_hash_delta : search_hash index search_hash { source = search_hash - path = {$SERVER_APP}/index/db/search_hash/index + path = /www/server/sphinx/index/db/search_hash/index ngram_len = 1 ngram_chars = U+3000..U+2FA1F @@ -74,7 +72,7 @@ index search_hash index search_hash_delta : search_hash { source = search_hash_delta - path = {$SERVER_APP}/index/db/search_hash_delta/index + path = /www/server/sphinx/index/db/search_hash_delta/index ngram_len = 1 ngram_chars = U+3000..U+2FA1F