diff --git a/install/sphinx/example.conf b/install/sphinx/example.conf new file mode 100644 index 000000000..89658fc28 --- /dev/null +++ b/install/sphinx/example.conf @@ -0,0 +1,133 @@ +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 ef2679995..1e7c3fbe4 100644 --- a/install/sphinx/sphinx.conf +++ b/install/sphinx/sphinx.conf @@ -61,10 +61,13 @@ index topics morphology = stem_enru charset_type = utf-8 charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42C->U+430..U+44C, U+42E..U+42F->U+44E..U+44F, U+430..U+44C, U+44E..U+44F, U+0401->U+0435, U+0451->U+0435, U+042D->U+0435, U+044D->U+0435 - min_prefix_len = 2 + min_prefix_len = 0 min_infix_len = 0 min_word_len = 1 + min_stemming_len = 4 enable_star = 1 + phrase_boundary = :, - , . , $ + phrase_boundary_step = 1 html_strip = 1 path = ./sphinx/data/topics source = topics @@ -95,5 +98,8 @@ searchd read_timeout = 5 max_children = 15 max_matches = 5000 + seamless_rotate = 1 + preopen_indexes = 0 + unlink_old = 1 pid_file = ./sphinx/searchd.pid } \ No newline at end of file diff --git a/upload/config.php b/upload/config.php index 6843fd6b7..e4e79cc66 100644 --- a/upload/config.php +++ b/upload/config.php @@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1; // Increase number of revision after update $bb_cfg['tp_version'] = '2.1 Stable'; -$bb_cfg['tp_release_state'] = 'R252'; -$bb_cfg['tp_release_date'] = '24-08-2011'; +$bb_cfg['tp_release_state'] = 'R253'; +$bb_cfg['tp_release_date'] = '25-08-2011'; $bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger $bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";