summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: