[pylucene-dev] Virtual Machine Question
fiorix at gmail.com
Tue Feb 26 18:36:07 PST 2008
For the first question: you need to call initVM only once, and before you
call any other method of lucene. You don't need to call initVM twice even if
you import another module of your own program that imports lucene. It seems
that the vm is a static member of lucene - perhaps Andi can confirm this.
About the second: It's not needed to shutdown the vm by hand. Since it's
attached to the python process that initialized it, it's going to be freed
when such process finish.
By the way, consider opening the index only once by process. See
http://wiki.apache.org/lucene-java/ImproveSearchingSpeed for details.
On Tue, Feb 26, 2008 at 10:36 PM, João Rodrigues <anaryin at gmail.com> wrote:
> Hello all!
> With Pylucene's JCC version, the initVM method must be called before I can
> operate with lucene. However, do I have to call it each time I import
> lucene? For instance, if I have two scripts, will I have to call it on the
> first, and then on the other?
> Another Q: How do I "shut the VM off"? I mean, at the end of my script, I
> want the memory it uses to be freed. How do I turn off the VM?
> Thanks for the answers!
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
Ship ahoy! Hast seen the While Whale?
- Melville's Captain Ahab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pylucene-dev