lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Opening an index directory inside a jar
Date Sun, 01 Jun 2008 19:23:59 GMT

: The crux of the issue seems to be that lucene cannot open segments file that
: is inside the jar (under luceneFiles/index directory)

i'm not entirely sure why it would have problems finding the segments 
file, but a larger problem is that Lucene needs random access which (last 
time i checked) isn't available when accessing files in jars...

http://www.nabble.com/Accessing-Lucene-Index-stored-in-a-jar-file-to3009604.html

...you cn always include the index in a jar, and then extract it before 
using it.

: unit/integration/functional tests depend on index files to be created. The
: manual step of creating the index files breaks the automated CI builds or
: some reliance on building the index in some tmp directory. Unfortunately
: that approach has issues if we run tests concurrently. Also, building the
: index takes a couple of minutes, so generating them on the fly for tests is
: expensive and increases the build time.

there's no inherent reason why concurrent tests need to collide if you use 
temp directories -- just have each test create it's own private tmp 
directory and copy the index (or exactract the index from the jar) to 
that private directory in the "setUp" method.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message