I don't even think you have to instantiate a file index first:
ram_dir = RAMDirectory('/the/path/to/the/index')
TJ
On Jun 27, 2008, at 3:30 PM, Andi Vajda wrote:
On Fri, 27 Jun 2008, Darren Govoni wrote:
I saw the RAMDirectory examples, but they didn't quite do what I
need.
The examples I saw showed how to create an in-memory index, write
docs
to it, then search it. What I need is to read a disk-based index into
memory, then search it (entirely in memory, not cached). I will hop
over
to the Lucene folks. Just wasn't sure if PyLucene supported that
specific behavior or not.
PyLucene supports whatever Java Lucene does. PyLucene is a wrapper
around Java Lucene. The Java Lucene jars are part of the PyLucene
egg and a Java VM is embedded in your Python process.
Quite simply, to load an index into memory completely:
- open up the file index -> fileindexreader
- create a new index with a RAMDirectory -> ramindexwriter
- call ramindexwriter.addIndexes([fileindexreader])
But, like I said, general Lucene questions are best answered on the
actual Lucene list. And the above steps may be bogus.
Andi..
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev