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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>