Re: How to add a Lucene index to a jar file?

2005-01-17 Thread Doug Cutting
David Spencer wrote: Isn't "ZipDirectory" the thing to search for? I think it's actually URLDirectory: http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg02453.html Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: How to add a Lucene index to a jar file?

2005-01-17 Thread Luke Francl
On Mon, 2005-01-17 at 13:10, Doug Cutting wrote: > The problem is that a jar file entry becomes an InputStream, but > InputStream is not random access, and Lucene requires random access. So > you need to extract the index either to disk or RAM in order to get > random access. I think folks ha

Re: How to add a Lucene index to a jar file?

2005-01-17 Thread David Spencer
Doug Cutting wrote: Miles Barr wrote: You'll have to implement org.apache.lucene.store.Directory to load the index from the JAR file. Take a look at FSDirectory and RAMDirectory for some more details. Then you have either load the JAR file with java.util.jar.JarFile to get to the files or you can u

Re: How to add a Lucene index to a jar file?

2005-01-17 Thread Doug Cutting
Miles Barr wrote: You'll have to implement org.apache.lucene.store.Directory to load the index from the JAR file. Take a look at FSDirectory and RAMDirectory for some more details. Then you have either load the JAR file with java.util.jar.JarFile to get to the files or you can use Classloader#getRe

Re: How to add a Lucene index to a jar file?

2005-01-17 Thread Miles Barr
On Mon, 2005-01-17 at 10:25 -0800, Bill Janssen wrote: > I'd like to package up a Lucene index with the Lucene class files and > my own application classes into a single jar file, so that it forms a > "double-clickable" single-file Java application that supports > searching over the index. However

How to add a Lucene index to a jar file?

2005-01-17 Thread Bill Janssen
Hi. I'd like to package up a Lucene index with the Lucene class files and my own application classes into a single jar file, so that it forms a "double-clickable" single-file Java application that supports searching over the index. However, I'm not sure how to read the index (create an IndexReade