Move sort/filtering code out of reslist

This commit is contained in:
Jean-Francois Dockes
2010-12-18 15:45:12 +01:00
parent c6b771ca99
commit c79410da94
19 changed files with 339 additions and 145 deletions
-2
View File
@@ -732,8 +732,6 @@ Query_fetchone(recoll_QueryObject* self, PyObject *, PyObject *)
printableUrl(rclconfig->getDefCharset(), doc->url,
doc->meta[Rcl::Doc::keyurl]);
doc->meta[Rcl::Doc::keytp] = doc->mimetype;
doc->meta[Rcl::Doc::keymt] = doc->dmtime.empty() ?
doc->fmtime : doc->dmtime;
doc->meta[Rcl::Doc::keyipt] = doc->ipath;
doc->meta[Rcl::Doc::keyfs] = doc->fbytes;
doc->meta[Rcl::Doc::keyds] = doc->dbytes;
+1 -1
View File
@@ -27,7 +27,7 @@ def doquery(db, q):
while query.next >= 0 and query.next < nres:
doc = query.fetchone()
print query.next, ":",
for k in ("title", "url"):
for k in ("title", "url", "mtime"):
print k, ":", getattr(doc, k).encode('utf-8')
abs = db.makeDocAbstract(doc, query).encode('utf-8')
print abs