You need to reopen your searcher after deleting. From Java doc for 
SearcherManager:

In addition you should periodically call maybeRefresh. While it's possible to 
call this just before running each query, this is discouraged since it 
penalizes the unlucky queries that do the reopen. It's better to use a separate 
background thread, that periodically calls maybeReopen. Finally, be sure to 
call close once you are done.


On Jul 10, 2014, at 01:56 PM, Jamie <ja...@mailarchiva.com> wrote:

Hi

I am using NRT search with the SearcherManager class. When the user elects to delete some documents, writer.deleteDocuments(terms) is called.

The problem is that deletes are not immediately visible. What does it take to make them so? Even after calling commit(), the deleted documents are still returned.

What is the recommended way to obtain a near realtime search result that immediately reflect all deleted documents?

Much appreciate

Jamie





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to