This isn't exactly what you were asking for and I know it is a somewhat ugly way to implement this (violates some OO rules by having knowledge of RAMDirectory internal implementation) but I thought it might be of use to some folks and/or might provide a starting point for someone else to try and tackle this.
It provides a mechanism for getting a RAMDirectory for an index stored on your classpath provided that you know the names of the files that comprise the index using ClassLoader.getResource The test class creates an index, puts it in a jar, adds the jar to a class loader, then reads the index from the jar via the class loader into a RAMDirectory. Eric -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 9:21 AM To: Lucene Users List Subject: Re: IndexSearcher on JAR resources? On May 7, 2004, at 6:14 AM, Edin Pezerovic wrote: > Hi, > I found following entry within the mail-archives: > > http://www.mail-archive.com/[EMAIL PROTECTED]/ > msg02129.html > > > Is there now (2 years ago) a possibility to have the index within a > jar-file? Someone posted something like this at one point, but ironically I cannot _find_ it. I definitely would be interested in having something like this handy. If anyone has pointers to the implementations posted, please let us know. Thanks, Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]