From 2767a67ea1c8f686b047066d937e1fa671cfd193 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Mon, 6 Feb 2017 18:51:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=B0=D1=82=D0=B0=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sphinx.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 ) }