incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r1440344 - /incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py
Date Wed, 30 Jan 2013 10:54:26 GMT
Author: andrej
Date: Wed Jan 30 10:54:26 2013
New Revision: 1440344

URL: http://svn.apache.org/viewvc?rev=1440344&view=rev
Log:
fix import bug in whoosh_backend.py

Modified:
    incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py

Modified: incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py?rev=1440344&r1=1440343&r2=1440344&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py (original)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py Wed Jan 30 10:54:26
2013
@@ -28,7 +28,7 @@ from trac.config import Option
 from trac.util.text import empty
 from trac.util.datefmt import utc
 from whoosh.fields import Schema, ID, DATETIME, KEYWORD, TEXT
-#from whoosh import index, sorting, query
+from whoosh import index
 import whoosh
 from whoosh.writing import AsyncWriter
 from datetime import datetime
@@ -150,11 +150,11 @@ class WhooshBackend(Component):
     def recreate_index(self):
         self.log.info('Creating Whoosh index in %s' % self.index_dir)
         self._make_dir_if_not_exists()
-        return whoosh.index.create_in(self.index_dir, schema=self.SCHEMA)
+        return index.create_in(self.index_dir, schema=self.SCHEMA)
 
     def _open_or_create_index_if_missing(self):
-        if whoosh.index.exists_in(self.index_dir):
-            return whoosh.index.open_dir(self.index_dir)
+        if index.exists_in(self.index_dir):
+            return index.open_dir(self.index_dir)
         else:
             return self.recreate_index()
 



Mime
View raw message