lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baskakov Daniel <>
Subject Synchronous Lucene index update tests occasionally fail
Date Thu, 23 Jun 2016 11:47:31 GMT
Originally i've posted the question at but without any
reply. So I hope someone can help me in the official list.

I'm testing that dynamic changes of the domain model reflects at the Lucene
index. Special event listeners (synchronous, no multithreading here) are
executed when the domain model components change. Listeners update the
Lucene index:

Document doc = createDocumentForComponent(domainModelComponent);
indexWriter.updateDocument(docTerm, doc);

Then I perform searching by a query that contains recently added changes.
Most of the time tests work perfect, but sometimes they fail (especially in
automated builds).

I've tried to acquire an IndexSearcher by different ways: create a new
searcher on the same Directory or obtain it via SearcherManager.

Is there a way to made recent index changes available to index searcher
with 100% confidence?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message