diff --git a/install/sphinx/example.conf b/install/sphinx/example.conf deleted file mode 100644 index 89658fc28..000000000 --- a/install/sphinx/example.conf +++ /dev/null @@ -1,133 +0,0 @@ -source torrents: torrentpier -{ - sql_query_pre = SET CHARACTER_SET_RESULTS=cp1251 - sql_query_range = SELECT MIN(topic_id), MAX(topic_id) FROM bb_topics - sql_range_step = 1000 - - sql_query = SELECT \ - t.topic_id, \ - t.forum_id, \ - t.topic_title as title, \ - t.topic_poster, \ - t.topic_replies, \ - t.topic_views, \ - t.topic_last_post_id, \ - r.size/1048576 as size, \ - r.checked_time, \ - r.reg_time, \ - r.seeder_last_seen, \ - r.complete_count, \ - r.tor_status as tor_status, \ - s.seeders, s.leechers, \ - s.leechers/(s.seeders+1) as leech2seed, \ - s.speed_up, s.speed_down, \ - r.attach_id \ - FROM \ - bb_topics t \ - JOIN bb_bt_torrents r on t.topic_id=r.topic_id \ - JOIN bb_attachments_desc a on r.attach_id=a.attach_id \ - LEFT OUTER JOIN bb_bt_tracker_snap s on r.topic_id=s.topic_id \ - WHERE t.topic_id >= $start AND t.topic_id <= $end - - - sql_attr_uint = topic_poster - sql_attr_uint = topic_replies - sql_attr_uint = topic_views - sql_attr_uint = forum_id - sql_attr_uint = topic_last_post_id - sql_attr_float = size - sql_attr_uint = tor_status - sql_attr_uint = complete_count - sql_attr_uint = attach_id - sql_attr_uint = seeders - sql_attr_uint = leechers - sql_attr_uint = speed_up - sql_attr_uint = speed_down - sql_attr_float = leech2seed - sql_attr_timestamp = reg_time - sql_attr_timestamp = checked_time - sql_attr_timestamp = seeder_last_seen -} - -source posts: torrentpier -{ - sql_query_pre = SET CHARACTER_SET_RESULTS=cp1251 - sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(post_id) FROM bb_posts_text - sql_query_range = SELECT MIN(post_id), (SELECT max_doc_id from sph_counter) FROM bb_posts_text - sql_range_step = 1000 - - sql_query = SELECT \ - pt.post_id, \ - p.poster_id, \ - p.post_time, \ - t.topic_id, \ - t.forum_id, \ - f.cat_id, \ - p2.post_time as last_post_in_topic_time, \ - ph.post_html as text, \ - t.topic_title as title \ - FROM \ - bb_posts_text pt \ - INNER JOIN \ - bb_posts p on p.post_id = pt.post_id \ - INNER JOIN \ - bb_topics t on p.topic_id = t.topic_id \ - INNER JOIN \ - bb_posts p2 on t.topic_last_post_id = p2.post_id \ - INNER JOIN \ - bb_forums f on t.forum_id = f.forum_id \ - INNER JOIN \ - bb_posts_html ph on ph.post_id = pt.post_id \ - WHERE pt.post_id >= $start AND pt.post_id <= $end - - sql_attr_uint = last_post_in_topic_time - sql_attr_uint = poster_id - sql_attr_uint = topic_id - sql_attr_uint = forum_id - sql_attr_uint = cat_id - sql_attr_timestamp = post_time -} - -source delta: posts -{ - sql_query_pre = SET CHARACTER_SET_RESULTS=cp1251 - sql_query_range = SELECT (SELECT max_doc_id from sph_counter), MAX(post_id) FROM bb_posts_text -} - -index topics -{ - docinfo = extern - morphology = stem_enru - stopwords = - min_word_len = 1 - charset_type = sbcs - charset_table = 0..9, A..Z->a..z, a..z, _, U+A8->U+E5, U+B8->U+E5, U+C0..U+DF->U+E0..U+FF, U+E0..U+FF - min_prefix_len = 0 - min_infix_len = 0 - min_stemming_len = 4 - enable_star = 1 - phrase_boundary = :, - , . , $ - phrase_boundary_step = 1 - path = /var/www/html/sphinx/topics - source = torrents - html_strip = 1 -} - -index doubles: topics -{ - source = torrents - path = /var/www/html/sphinx/doubles - stopwords = /var/www/html/sphinx/stopwords.txt -} - -index posts: topics -{ - path = /var/www/html/sphinx/posts - source = posts -} - -index delta: posts -{ - path = /var/www/html/sphinx/delta - source = delta -} \ No newline at end of file diff --git a/install/sphinx/sphinx.conf b/install/sphinx/sphinx.conf index 1e7c3fbe4..abbaadb58 100644 --- a/install/sphinx/sphinx.conf +++ b/install/sphinx/sphinx.conf @@ -8,7 +8,6 @@ source torrentpier sql_query_pre = SET NAMES utf8 sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 sql_query_pre = SET CHARACTER_SET_CLIENT=utf8 - sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 } source topics: torrentpier @@ -50,7 +49,7 @@ source users: torrentpier FROM bb_users \ WHERE user_id BETWEEN $start AND $end - sql_query_range = SELECT (SELECT user_id FROM bb_users WHERE user_id = 1), MAX(user_id) FROM bb_users + sql_query_range = SELECT 1, MAX(user_id) FROM bb_users sql_range_step = 1000 sql_query_info = SELECT * FROM bb_users WHERE user_id = $id } @@ -66,8 +65,8 @@ index topics min_word_len = 1 min_stemming_len = 4 enable_star = 1 - phrase_boundary = :, - , . , $ - phrase_boundary_step = 1 + phrase_boundary = :, - , . , $ + phrase_boundary_step = 1 html_strip = 1 path = ./sphinx/data/topics source = topics @@ -98,8 +97,8 @@ searchd read_timeout = 5 max_children = 15 max_matches = 5000 - seamless_rotate = 1 - preopen_indexes = 0 - unlink_old = 1 + seamless_rotate = 1 + preopen_indexes = 0 + unlink_old = 1 pid_file = ./sphinx/searchd.pid } \ No newline at end of file