diff --git a/sphinx.conf b/sphinx.conf index 771c48c..857e55a 100644 --- a/sphinx.conf +++ b/sphinx.conf @@ -18,7 +18,7 @@ source files_index torrents.hash as hash, torrents.name as name, torrents.size as size, \ torrents.seeders, torrents.leechers, torrents.completed, \ torrents.files, torrents.contentType, torrents.contentCategory, \ - torrents.good, torrents.bad \ + torrents.good, torrents.bad, UNIX_TIMESTAMP(torrents.added) AS added \ FROM files as fls INNER JOIN torrents ON(torrents.hash = fls.hash) sql_field_string = path @@ -35,6 +35,7 @@ source files_index sql_attr_string = contentCategory sql_attr_uint = good sql_attr_uint = bad + sql_attr_timestamp = added } index files_index @@ -52,7 +53,7 @@ source files_index_delta : files_index torrents.hash as hash, torrents.name as name, torrents.size as size, \ torrents.seeders, torrents.leechers, torrents.completed, \ torrents.files, torrents.contentType, torrents.contentCategory, \ - torrents.good, torrents.bad \ + torrents.good, torrents.bad, UNIX_TIMESTAMP(torrents.added) AS added \ 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 ) } @@ -78,7 +79,7 @@ source torrents_index 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, \ - torrents.good, torrents.bad \ + torrents.good, torrents.bad, UNIX_TIMESTAMP(torrents.added) AS added \ FROM torrents sql_attr_string = hash @@ -92,6 +93,7 @@ source torrents_index sql_attr_string = contentCategory sql_attr_uint = good sql_attr_uint = bad + sql_attr_timestamp = added } index torrents_index @@ -108,7 +110,7 @@ source torrents_index_delta : torrents_index 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, \ - torrents.good, torrents.bad \ + torrents.good, torrents.bad, UNIX_TIMESTAMP(torrents.added) AS added \ FROM torrents \ WHERE torrents.torrentid > ( SELECT max_doc_id FROM sphinx_counter WHERE counter_id = 2 ) }