correct threading lucene problem V00.18
authorymh <ymh.work@gmail.com>
Sun, 06 Mar 2011 21:38:22 +0100
changeset 63 94d6891f3326
parent 62 d3178843076c
child 64 d6639b856dc1
correct threading lucene problem
web/blinkster/__init__.py
web/blinkster/ldt/__init__.py
--- a/web/blinkster/__init__.py	Fri Mar 04 23:11:41 2011 +0100
+++ b/web/blinkster/__init__.py	Sun Mar 06 21:38:22 2011 +0100
@@ -1,3 +1,3 @@
-VERSION = (0, 17)
+VERSION = (0, 18)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
--- a/web/blinkster/ldt/__init__.py	Fri Mar 04 23:11:41 2011 +0100
+++ b/web/blinkster/ldt/__init__.py	Sun Mar 06 21:38:22 2011 +0100
@@ -2,8 +2,7 @@
 from django.conf import settings
 #import fileimport
 
-jcenv = lucene.initVM(lucene.CLASSPATH)
-jcenv.attachCurrentThread()
+lucene.initVM(lucene.CLASSPATH)
 
 
 STORE = lucene.SimpleFSDirectory(lucene.File(settings.INDEX_PATH))
@@ -14,9 +13,9 @@
 ANALYZER.addAnalyzer("all", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
 
 def get_store():
-    jcenv.attachCurrentThread()
+    lucene.getVMEnv().attachCurrentThread()
     return STORE
 
 def get_analyzer():
-    jcenv.attachCurrentThread()
+    lucene.getVMEnv().attachCurrentThread()
     return ANALYZER