1) Should the "FSDirectory dir" object be shared as some sort of static
variable?
I don't think it matters, do the simplest thing. The overhead in creating an
FSDirectory is so small in relation to the other operations that I don't
think you'd ever notice.
2) Should the "IndexSearcher searcher" or
Apologies if this info is already somewhere, but google cant find it
(: I am assuming the following code is completely thread safe:
// Called from a servlet when a user action results in the index
needing to be updated
public static void rebuildIndex() {
FSDirectory dir = new NIOFSDirecto