git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@254 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2011-08-25 16:13:39 +00:00
commit d68564590d
2 changed files with 6 additions and 140 deletions

View file

@ -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
}

View file

@ -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
}