diff --git a/plugins/sphinx/tpl/simdht.conf b/plugins/sphinx/tpl/simdht.conf index 7b7c18def..51d5b26ea 100755 --- a/plugins/sphinx/tpl/simdht.conf +++ b/plugins/sphinx/tpl/simdht.conf @@ -39,7 +39,7 @@ source 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 + FROM search_hash where id >= $start AND id <= $end AND is_has=1 sql_attr_bigint = length sql_attr_timestamp = create_time diff --git a/plugins/sphinx/tpl/simdht_delta.conf b/plugins/sphinx/tpl/simdht_delta.conf index 8217c49c4..379b26d58 100755 --- a/plugins/sphinx/tpl/simdht_delta.conf +++ b/plugins/sphinx/tpl/simdht_delta.conf @@ -41,7 +41,7 @@ source 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 + FROM search_hash where id >= $start AND id <= $end AND is_has=1 sql_attr_bigint = length sql_attr_timestamp = create_time @@ -53,7 +53,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 + 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_attr_bigint = length sql_attr_timestamp = create_time sql_attr_timestamp = last_seen