Author: rjollos
Date: Wed Apr 9 05:00:25 2014
New Revision: 1585890
URL: http://svn.apache.org/r1585890
Log:
0.8dev: Added Whoosh version to //SystemInfo// table. Refs #794.
Patch by devenderbindal.
Modified:
bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py
Modified: bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py?rev=1585890r1=1585889r2=1585890view=diff
==
--- bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py (original)
+++ bloodhound/trunk/bloodhound_search/bhsearch/whoosh_backend.py Wed Apr 9
05:00:25 2014
@@ -24,6 +24,7 @@ from datetime import datetime
from trac.core import Component, implements, TracError
from trac.config import Option, IntOption
+from trac.env import ISystemInfoProvider
from trac.util.datefmt import utc
import whoosh
@@ -44,7 +45,7 @@ class WhooshBackend(Component):
Implements Whoosh SearchBackend interface
-implements(ISearchBackend)
+implements(ISearchBackend, ISystemInfoProvider)
index_dir_setting = Option(
BHSEARCH_CONFIG_SECTION,
@@ -124,7 +125,13 @@ class WhooshBackend(Component):
else:
self.index = None
-#ISearchBackend methods
+# ISystemInfoProvider methods
+
+def get_system_info(self):
+yield 'Whoosh', whoosh.versionstring()
+
+# ISearchBackend methods
+
def start_operation(self):
return self._create_writer()