lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Isakson" <Eric.Isak...@sas.com>
Subject RE: IndexSearcher on JAR resources?
Date Thu, 13 May 2004 13:58:58 GMT
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:erik@ehatchersolutions.com] 
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/lucene-user@jakarta.apache.org/
> 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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org



Mime
View raw message