development, ctrl+c on
unix),
sometimes it seems commit.lock file is left. Now problem is that
apparently
[Anand Stephen] You could attach the current Thread to Runtime shut
down hook and release all resources when (ctrl +c) or the app shuts
down. This works for me.
code-snip
Thread t = new
);
}
}
writer.optimize();
writer.close();
/code
-- anand stephen
iterator
while (condition) {
try {
writer.addDocument(doc);
} catch (Exception e) {
logger.error(Failed to index doc );
}
}
writer.optimize();
writer.close();
/code
-- anand stephen
---
Outgoing mail