lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: deleteDocument with NRT
Date Fri, 11 Jul 2014 09:09:22 GMT
Are you sure the deletes are "working"?  Ie, the terms you are
deleting by in fact match the documents you are trying to delete?
(Try instead searching on those terms, to make sure they really do
match the docs...).

Can you boil this down to a small test case?

Mike McCandless

On Fri, Jul 11, 2014 at 4:13 AM, Jamie <> wrote:
> Thanks for the advice. I forgot to mention, I am already calling
> searcher.maybeRefresh() immediately after deleting the documents.
> Furthermore, searcherManager is being instantiated with applyAllDeletes set
> to true. We are using the searchAfter function. Under these circumstances,
> the deleted items are still present. Any further ideas?
> On 2014/07/11, 12:30 AM, Tri Cao wrote:
>> You need to reopen your searcher after deleting. From Java doc for
>> SearcherManager:
>> In addition you should periodically call maybeRefresh
>> <eclipse-javadoc:%E2%98%82=lucene-solr/lucene%5C/core%5C/src%5C/>.
>> 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
>> <eclipse-javadoc:%E2%98%82=lucene-solr/lucene%5C/core%5C/src%5C/>
>> once you are done.
>> On Jul 10, 2014, at 01:56 PM, Jamie <> 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:
For additional commands, e-mail:

View raw message