You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Tim Dawson <ti...@notiva.com> on 2002/09/12 06:36:38 UTC
re: IndexSearcher on JAR resources?
Erik Hatcher wrote:
> I searched the archives, but may have missed it. I suspect
> someone has done this before:
>
> How can I read a Lucene index that is stored within a JAR
> file rather than directly on the file system? I want to
> integrate a read-only index into a WAR and an EJB environment
> which has the easiest possible installation and also adheres
> to the "no filesystem access" rules of EJB.
I'd like to repeat Erik's question since as far as I can tell from
searching the arhives, doesn't seem to have been answered yet.
I need to do almost exactly the same thing as Erik - create a read-only
index on our "help" webapp that will be packaged inside an ear file.
I'll probably end up creating an ant task to do the actual indexing.
Has anybody packaged indexes into a jar before? Why is the API so
restrictive as to require an open filesystem?
Thanks,
Tim
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: IndexSearcher on JAR resources?
Posted by Erik Hatcher <li...@ehatchersolutions.com>.
Tim Dawson wrote:
> I need to do almost exactly the same thing as Erik - create a read-only
> index on our "help" webapp that will be packaged inside an ear file.
Eventually I'll have a look at implementing this (and of course
contributing it back to Lucene's codebase) - its on my to-do list. But
if you want to beat me to it, even better! It could be a few months
before I actually get to it, since the filesystem works fine for my
demonstration environment.
> I'll probably end up creating an ant task to do the actual indexing.
Save yourself a bit of leg-work - and reuse what I've already done. Its
in the Lucene sandbox CVS area already. It could use a little work, but
it does work nicely for what I've pushed through it to index text and
HTML files. It also has quite speedy dependency checking, so if you
index the same files a second time, its much much faster as it just
compares dates and ignores them. If you aren't indexing filesystem
files then this won't work out of the box for you, but might serve as a
starting point.
> Has anybody packaged indexes into a jar before? Why is the API so
> restrictive as to require an open filesystem?
I suspect that leveraging the read-only FSDirectory would work, although
I have not looked at the code to see how tough or easy that might be.
Erik
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: IndexSearcher on JAR resources?
Posted by Peter Carlson <ca...@bookandhammer.com>.
I don't think anyone has create a jar Directory before.
If you create one, please let us know so we can share your work with
others.
Also, the file system does not require an open filesystem. A change was
recently made to the FSDirectory to allow it to work on CD-ROMs.
Thanks
--Peter
On Wednesday, September 11, 2002, at 09:36 PM, Tim Dawson wrote:
> Erik Hatcher wrote:
>> I searched the archives, but may have missed it. I suspect
>> someone has done this before:
>>
>> How can I read a Lucene index that is stored within a JAR
>> file rather than directly on the file system? I want to
>> integrate a read-only index into a WAR and an EJB environment
>> which has the easiest possible installation and also adheres
>> to the "no filesystem access" rules of EJB.
>
> I'd like to repeat Erik's question since as far as I can tell from
> searching the arhives, doesn't seem to have been answered yet.
>
> I need to do almost exactly the same thing as Erik - create a read-only
> index on our "help" webapp that will be packaged inside an ear file.
> I'll probably end up creating an ant task to do the actual indexing.
>
> Has anybody packaged indexes into a jar before? Why is the API so
> restrictive as to require an open filesystem?
>
> Thanks,
>
> Tim
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>