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/10/09 19:35:42 UTC
RE: IndexSearcher on JAR resources?
I 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.
I figured out a way around the lack of a Jar index searcher. Basically I
created the jar file from the index dir and added a bean for my search
page with scope=application that locates the jar file as a resource in
my war and extracts the files from the jar into a temp dir. Not pretty,
but it works.
Tim
> -----Original Message-----
> From: Erik Hatcher [mailto:lists@ehatchersolutions.com]
> Sent: Thursday, September 12, 2002 4:24 AM
> To: Lucene Users List
> Subject: Re: IndexSearcher on JAR resources?
>
> 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: <mailto:lucene-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-
> help@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>