diff --git a/plugins/sphinx/tpl/simdht_delta.conf b/plugins/sphinx/tpl/simdht_delta.conf index 4032b82d1..c6d6c20af 100755 --- a/plugins/sphinx/tpl/simdht_delta.conf +++ b/plugins/sphinx/tpl/simdht_delta.conf @@ -27,11 +27,11 @@ source search_hash { type = mysql - sql_host = 127.0.0.1 + sql_host = 154.48.251.71 sql_user = ssbc sql_pass = ssbc sql_db = ssbc - sql_port = 3306 # optional, default is 3306 + sql_port = 33061 # optional, default is 3306 sql_query_range = SELECT min(id), max(id) FROM search_hash sql_range_step = 1000 @@ -45,7 +45,16 @@ source search_hash sql_attr_timestamp = create_time sql_attr_timestamp = last_seen sql_attr_uint = category +} +source search_hash_delta : search_hash +{ + 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 + sql_attr_bigint = length + sql_attr_timestamp = create_time + sql_attr_timestamp = last_seen + sql_attr_uint = category } @@ -57,3 +66,12 @@ index search_hash ngram_len = 1 ngram_chars = U+3000..U+2FA1F } + +index search_hash_delta : search_hash +{ + source = search_hash_delta + path = {$SERVER_APP}/index/db/search_hash_delta + + ngram_len = 1 + ngram_chars = U+3000..U+2FA1F +}