I'm trying what should be the dumbest possible example of concurrency
management with 2.0 in Java with an ordinary FSDirectory.

 

I create an IndexWriter from a pathname, an IndexReader from the same
pathname, and an IndexSearcher from the reader.

 

I add one document.

 

I call isCurrent() on the reader. It says, 'false'.

 

So, I close the reader and the searcher, and I create a new reader and a
new searcher.  I search for the document, and I don't find it.

 

I must be missing something simple.

 

Reply via email to