On Sat, 2005-04-02 at 10:29 +0200, Kristian Ottosen wrote:
> I wonder if there is general problem running Lucene on top of some of the
> journaling file systems like ReiserFS or Ext3?
I haven't had any problems running Lucene on either of those file
systems. I've done updates to the index while people are still searching
and it all worked fine.
> The problem may not appear immediately - but only after several
> thousand documents have been indexed in a row using a combination of
> IndexSearcher (check for duplicates) and IndexWriter (add document)
> operations.
Are you deleting the duplicates as you find them? i.e. are you closing
and opening reader/writers all the time? If you are, besides
recommending switching to batch updates, I suggest being really thorough
with closing everything, e.g.
IndexReader reader = null;
IndexWriter writer = null;
try {
reader = IndexReader.open(/* Path to index */);
... do the deletes ...
reader.close();
reader = null;
writer = new IndexWriter(index, /* Your analyzer */, false);
... do the deletes ....
writer.optimize();
writer.close();
writer = null;
}
catch (IOException e) {
... do any error processing ...
}
finally {
// We can do both these closes in the same finally block because if
// reader is not null then writer is null, so we don't need to worry
// about reader.close() throwing another IOException
if (reader != null) {
reader.close();
reader = null;
}
if (writer != null) {
writer.optimize();
writer.close();
writer = null;
}
}
--
Miles Barr <[EMAIL PROTECTED]>
Runtime Collective Ltd.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]