lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Horan" <Mark.Ho...@xplana.com>
Subject Problem With RAMDirectory.
Date Wed, 31 Aug 2005 21:17:21 GMT
Hi,

I'm using the Lucene demo to create an index for 10 text files, just for
testing. I use the demo to do searches on the created index, and all
seems well. I want to perform the search via an applet, for reasons not
relevant to the problem I'm having. I zip up the three files in the
index so the applet can fetch the index from disk or across the network.
I use the java.util.zip library to unpack the three files as byte
arrays, which I use to create three files in the RAMDirectory. I have
print statements in my code and RAMDirectory member functions to confirm
that the three files are named correctly, and they contain same number
of bytes as the three uncompressed files in my index on disk. I then
perform searches against this RAMDirectory index, and it behaves just
fine.

Now the problem. If I increase the number of files indexed to 20, files
with random text in them, actually paragraphs from Moby Dick, no search
results
Whatsoever can be obtained from using the RAMDirectory as the index in
my applet. I can perform queries accurately from the command line with
the Lucene demo against the uncompressed index on disk, but the
RAMDirectory index in my applet appears worthless, and the only variable
that appears to have changed is the number of files indexed, in either
case a small number.

Is there some gotcha in my methodology which is to populate the
RAMDirectory index in my applet with the three index files as byte
arrays obtained via URL and URLConnection? Why does this methodology
work perfectly with 10, or even up to 17 documents indexed, but fail
with just one additional document?
Has anyone used this method of populating the RAMDirectory index from
already created index files? Again, the system works fine with a very
small index, and fails predictably with just slightly larger ones,
larger indexes which are still many orders of magnitude smaller than
what my actual use case is.

I would appreciate any feedback.

Thanks,
 Mark Horan
 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message