mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
0b71f53227
commit
54148e5f2b
46
gazelle.sql
46
gazelle.sql
@ -723,6 +723,12 @@ CREATE TABLE `schedule` (
|
||||
`NextBiWeekly` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
|
||||
CREATE TABLE `sphinx_a` (
|
||||
`gid` int(11) DEFAULT NULL,
|
||||
`aname` text CHARACTER SET utf8 COLLATE utf8_bin,
|
||||
KEY `gid` (`gid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
|
||||
|
||||
CREATE TABLE `sphinx_delta` (
|
||||
`ID` int(10) NOT NULL,
|
||||
`GroupID` int(11) NOT NULL DEFAULT '0',
|
||||
@ -862,6 +868,46 @@ CREATE TABLE `sphinx_requests_delta` (
|
||||
KEY `LastVote` (`LastVote`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `sphinx_t` (
|
||||
`id` int(11) NOT NULL,
|
||||
`gid` int(11) NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`size` bigint(20) DEFAULT NULL,
|
||||
`snatched` int(11) DEFAULT NULL,
|
||||
`seeders` int(11) DEFAULT NULL,
|
||||
`leechers` int(11) DEFAULT NULL,
|
||||
`time` int(11) DEFAULT NULL,
|
||||
`logscore` smallint(6) DEFAULT NULL,
|
||||
`scene` tinyint(4) DEFAULT NULL,
|
||||
`haslog` tinyint(4) DEFAULT NULL,
|
||||
`hascue` tinyint(4) DEFAULT NULL,
|
||||
`freetorrent` tinyint(4) DEFAULT NULL,
|
||||
`media` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`format` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`encoding` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`remyear` smallint(6) DEFAULT NULL,
|
||||
`remtitle` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`remrlabel` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`remcnumber` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`filelist` mediumtext CHARACTER SET utf8 COLLATE utf8_bin,
|
||||
`remident` int(10) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `gid_remident` (`gid`,`remident`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
|
||||
|
||||
CREATE TABLE `sphinx_tg` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` varchar(300) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`tags` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`year` smallint(6) DEFAULT NULL,
|
||||
`rlabel` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`cnumber` varchar(80) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`catid` smallint(6) DEFAULT NULL,
|
||||
`reltype` smallint(6) DEFAULT NULL,
|
||||
`vanityhouse` tinyint(4) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
|
||||
|
||||
CREATE TABLE `staff_blog` (
|
||||
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`UserID` int(10) unsigned NOT NULL,
|
||||
|
73
sphinx.conf
73
sphinx.conf
@ -37,52 +37,34 @@ source torrents : torrents_base {
|
||||
sql_query_pre = set group_concat_max_len = 101400
|
||||
sql_query_pre = set @starttime = now()
|
||||
|
||||
sql_query_pre = create temporary table sphinx_tg \
|
||||
(id int primary key, name varchar(300), tags varchar(500), \
|
||||
year smallint, rlabel varchar(80), \
|
||||
cnumber varchar(80), catid smallint, time int, \
|
||||
reltype smallint, vanityhouse tinyint) \
|
||||
engine=myisam;
|
||||
|
||||
sql_query_pre = truncate sphinx_tg
|
||||
sql_query_pre = insert into sphinx_tg \
|
||||
(id, name, tags, year, rlabel, cnumber, catid, time, reltype, \
|
||||
(id, name, tags, year, rlabel, cnumber, catid, reltype, \
|
||||
vanityhouse) \
|
||||
select id, name, taglist, year, recordlabel, cataloguenumber, \
|
||||
categoryid, unix_timestamp(time), releasetype, \
|
||||
vanityhouse \
|
||||
from torrents_group \
|
||||
where time < @starttime;
|
||||
where time < @starttime
|
||||
|
||||
|
||||
sql_query_pre = create temporary table sphinx_t \
|
||||
(id int primary key, gid int, size bigint, snatched int, \
|
||||
seeders int, leechers int, time int, logscore smallint, \
|
||||
scene tinyint, haslog tinyint, hascue tinyint, \
|
||||
freetorrent tinyint, media varchar(15), \
|
||||
format varchar(15), encoding varchar(30), \
|
||||
remyear smallint, remtitle varchar(50), \
|
||||
remrlabel varchar(50), remcnumber varchar(50), \
|
||||
filelist mediumtext, \
|
||||
index (gid)) \
|
||||
engine=myisam;
|
||||
|
||||
sql_query_pre = truncate sphinx_t
|
||||
sql_query_pre = insert into sphinx_t \
|
||||
(id, gid, size, snatched, seeders, leechers, time, logscore, scene, \
|
||||
haslog, hascue, freetorrent, media, format, encoding, \
|
||||
remyear, remtitle, remrlabel, remcnumber, filelist) \
|
||||
select id, groupid, size, snatched, seeders, leechers, time, \
|
||||
remyear, remtitle, remrlabel, remcnumber, filelist, uid, remident) \
|
||||
select id, groupid, size, snatched, seeders, leechers, unix_timestamp(time), \
|
||||
logscore, cast(scene as char), cast(haslog as char), \
|
||||
cast(hascue as char), cast(freetorrent as char), media, \
|
||||
format, encoding, remasteryear, remastertitle, \
|
||||
remasterrecordlabel, remastercataloguenumber, filelist \
|
||||
remasterrecordlabel, remastercataloguenumber, filelist, userid, \
|
||||
crc32(concat_ws(' ', media, remasteryear, remastertitle, \
|
||||
remasterrecordlabel, remastercataloguenumber)) \
|
||||
from torrents \
|
||||
where time < @starttime;
|
||||
where time < @starttime
|
||||
|
||||
|
||||
sql_query_pre = create temporary table sphinx_a \
|
||||
(gid int primary key, aname text) \
|
||||
engine=myisam;
|
||||
|
||||
sql_query_pre = truncate sphinx_a
|
||||
sql_query_pre = insert into sphinx_a \
|
||||
(gid, aname) \
|
||||
select groupid, group_concat(aa.name separator ' ') \
|
||||
@ -90,7 +72,7 @@ source torrents : torrents_base {
|
||||
join artists_alias aa using(aliasid) \
|
||||
where importance in ('1','3','4','5','6') \
|
||||
group by ta.groupid \
|
||||
order by null;
|
||||
order by null
|
||||
|
||||
|
||||
sql_query = select t.id, g.id groupid, g.name groupname, tags taglist, \
|
||||
@ -450,6 +432,37 @@ index log_delta : log {
|
||||
path = /var/data/sphinx/log_delta
|
||||
}
|
||||
|
||||
source better_transcode : connect {
|
||||
sql_attr_uint = logscore
|
||||
sql_attr_uint = groupid
|
||||
sql_attr_uint = uploader
|
||||
|
||||
sql_query = select t.id, groupid, logscore, format, encoding, \
|
||||
name groupname, tags taglist, year, uploader, remident \
|
||||
from (select t.id, gid groupid, uid uploader, remident, \
|
||||
if(media='cd',max(t.logscore),100) logscore, \
|
||||
group_concat(distinct format separator ' ') \
|
||||
format, \
|
||||
group_concat(distinct encoding separator ' ') \
|
||||
encoding \
|
||||
from sphinx_t t \
|
||||
where format in ('mp3', 'flac') \
|
||||
group by gid, remident) t \
|
||||
join sphinx_tg g on g.id = groupid \
|
||||
where catid = 1
|
||||
|
||||
sql_joined_field = artistname from query; \
|
||||
select t.id, aname \
|
||||
from sphinx_a \
|
||||
join sphinx_t t using(gid) \
|
||||
order by t.id asc
|
||||
}
|
||||
index better_transcode : torrents {
|
||||
source = better_transcode
|
||||
path = /var/data/sphinx/better_transcode
|
||||
phrase_boundary =
|
||||
}
|
||||
|
||||
indexer {
|
||||
mem_limit = 64M
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user