I built a simple wrapper service around a class that reads and queries a Lucene index using pylucene
(6.5). I get the following error when running the server:
RuntimeError: attachCurrentThread() must be called first
I assume that the problem stems from the lucene.initVM()
statement and I tried moving it in different places. It works if I put it in the request method, but that means I need to load the index with every request.
Is there a better way to do it?