дельта индекс
This commit is contained in:
parent
96196d1e17
commit
ff6867d0f4
38
sphinx.conf
38
sphinx.conf
@ -12,6 +12,7 @@ source files_index
|
|||||||
sql_db = btsearch
|
sql_db = btsearch
|
||||||
sql_port = 3306 # optional, default is 3306
|
sql_port = 3306 # optional, default is 3306
|
||||||
|
|
||||||
|
sql_query_pre = REPLACE INTO sphinx_counter SELECT 1, MAX(fileid) FROM torrents
|
||||||
sql_query = \
|
sql_query = \
|
||||||
SELECT fls.fileid, fls.path, fls.size as filesize, \
|
SELECT fls.fileid, fls.path, fls.size as filesize, \
|
||||||
torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
||||||
@ -33,7 +34,6 @@ source files_index
|
|||||||
sql_attr_string = contentCategory
|
sql_attr_string = contentCategory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
index files_index
|
index files_index
|
||||||
{
|
{
|
||||||
source = files_index
|
source = files_index
|
||||||
@ -41,6 +41,23 @@ index files_index
|
|||||||
min_word_len = 3
|
min_word_len = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source files_index_delta : files_index
|
||||||
|
{
|
||||||
|
sql_query = \
|
||||||
|
SELECT fls.fileid, fls.path, fls.size as filesize, \
|
||||||
|
torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
||||||
|
torrents.seeders, torrents.leechers, torrents.completed, \
|
||||||
|
torrents.files, torrents.contentType, torrents.contentCategory \
|
||||||
|
FROM files as fls INNER JOIN torrents ON(torrents.hash = fls.hash) \
|
||||||
|
WHERE fls.fileid > ( SELECT max_doc_id FROM sphinx_counter WHERE counter_id = 1 )
|
||||||
|
}
|
||||||
|
|
||||||
|
index files_index_delta : files_index
|
||||||
|
{
|
||||||
|
source = files_index_delta
|
||||||
|
path = /var/data/files.delta
|
||||||
|
}
|
||||||
|
|
||||||
source torrents_index
|
source torrents_index
|
||||||
{
|
{
|
||||||
type = mysql
|
type = mysql
|
||||||
@ -51,6 +68,7 @@ source torrents_index
|
|||||||
sql_db = btsearch
|
sql_db = btsearch
|
||||||
sql_port = 3306 # optional, default is 3306
|
sql_port = 3306 # optional, default is 3306
|
||||||
|
|
||||||
|
sql_query_pre = REPLACE INTO sphinx_counter SELECT 2, MAX(torrentid) FROM torrents
|
||||||
sql_query = \
|
sql_query = \
|
||||||
SELECT torrents.torrentid, torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
SELECT torrents.torrentid, torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
||||||
torrents.seeders, torrents.leechers, torrents.completed, \
|
torrents.seeders, torrents.leechers, torrents.completed, \
|
||||||
@ -68,7 +86,6 @@ source torrents_index
|
|||||||
sql_attr_string = contentCategory
|
sql_attr_string = contentCategory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
index torrents_index
|
index torrents_index
|
||||||
{
|
{
|
||||||
source = torrents_index
|
source = torrents_index
|
||||||
@ -76,6 +93,23 @@ index torrents_index
|
|||||||
min_word_len = 3
|
min_word_len = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source torrents_index_delta : torrents_index
|
||||||
|
{
|
||||||
|
sql_query = \
|
||||||
|
SELECT torrents.torrentid, torrents.hash as hash, torrents.name as name, torrents.size as size, \
|
||||||
|
torrents.seeders, torrents.leechers, torrents.completed, \
|
||||||
|
torrents.files, torrents.contentType, torrents.contentCategory \
|
||||||
|
FROM torrents \
|
||||||
|
WHERE torrents.torrentid > ( SELECT max_doc_id FROM sphinx_counter WHERE counter_id = 2 )
|
||||||
|
}
|
||||||
|
|
||||||
|
index torrents_index_delta : torrents_index
|
||||||
|
{
|
||||||
|
source = torrents_index_delta
|
||||||
|
path = /var/data/torrents.delta
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
indexer
|
indexer
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user