summaryrefslogtreecommitdiff
path: root/index.py
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-11-19 23:47:22 +0100
committeryvesf <yvesf-git@xapek.org>2010-11-19 23:47:22 +0100
commit6c91093cacd0e4ebcdfd1bca7c79dc906527b94c (patch)
tree25c3d6320f521aef5720d8bed058ff92f5cc35eb /index.py
parentb698f758e7df49ff5d9c09bd2f9946589841d2bc (diff)
downloadbooksearch-6c91093cacd0e4ebcdfd1bca7c79dc906527b94c.tar.gz
booksearch-6c91093cacd0e4ebcdfd1bca7c79dc906527b94c.zip
prettify output; only one pdf thread
Diffstat (limited to 'index.py')
-rw-r--r--index.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.py b/index.py
index 5a37008..3758233 100644
--- a/index.py
+++ b/index.py
@@ -65,11 +65,12 @@ class IndexWorker(Thread):
doc = documents.get(True, 0.5)
except Empty:
continue
+ print u"{0} adding {1}".format(self.name, doc['path'])
writer = index.writer()
writer.add_document(**doc)
+ writer.commit()
documents.task_done()
print u"{0} added {1}".format(self.name, doc['path'])
- writer.commit()
threads = map(lambda i: PDFWorker(), range(1))
for thread in threads: