views:

114

answers:

2

I created a lucene index and compressed the index directory with bz2 or zip. I donot want to uncompress it. Is there any API call that can read the index from this zipped directory and thus allow searching and other functionalities. That is, can lucence IndexReader read the index from a compressed file.

I saw that Lucnene IndexReader does not support "Reader" to open the index, otherwise I would have created a Reader class that uncompresses the file and streams the uncompressed version.

Any alternatives to this are welcome.

Thanks, Akhil

A: 

There are some virtual filesystem implementations out there that would allow you to mount a ZIP/GZ file as a disk. One example is fuse-zip: http://code.google.com/p/fuse-zip/ .

However, Lucene has no built in support for for reading a zipped index.

bajafresh4life
A: 

I would probably go with the virtual filesystem myself, but you theoretically could implement a Directory interface implementaion

MJB