diff options
author | yvesf <yvesf-git@xapek.org> | 2010-12-01 17:27:07 +0100 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2010-12-01 17:27:07 +0100 |
commit | 3e8feb517d2cc4022ff3afd787478376db59fd10 (patch) | |
tree | 438658cc6e1645ab49b860d9dd238eee4b999f48 /web.py | |
parent | 9b09da2a0d5806a161c9b25f62193be2d0c2eec1 (diff) | |
download | booksearch-3e8feb517d2cc4022ff3afd787478376db59fd10.tar.gz booksearch-3e8feb517d2cc4022ff3afd787478376db59fd10.zip |
fix request time
Diffstat (limited to 'web.py')
-rw-r--r-- | web.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -139,8 +139,8 @@ def do_search(term=None): filepath = book[0] with index_metadata.searcher() as searcher: docnum = searcher.document_number(path=filepath) - with index_metadata.reader() as reader2: - title = reader2.stored_fields(docnum).get("title") + with index_metadata.reader() as metadata_reader: + title = metadata_reader.stored_fields(docnum).get("title") books[docnum] = { "matches" : [], "title":title, @@ -154,7 +154,7 @@ def do_search(term=None): return flask.render_template("search.html", books=books, term=term, - time=time.time()-time_start) + time_taken=time.time()-time_start) def log_response(sender, response): sender.logger.debug("Request context is about to close down. " |