lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: IndexReader.deleteDocument in Lucene 3.6
Date Fri, 25 May 2012 16:40:16 GMT
On Fri, May 25, 2012 at 5:23 AM, Nikolay Zamosenchuk
<nikolazius@gmail.com> wrote:
> IndexWriter.deleteDocument(..) is not final,
> but doesn't return any result.

Deleted terms are buffered for good performance, so at the time of
IndexWriter.deleteDocument(Term) we don't know how many documents
match the term.

> Can anyone please suggest how to solve this issue? Can simply run term
> query before, but it seems to be absolutely inefficient.

You could switch to an asynchronous design and use a custom query that
keeps track of how many (or which) documents it matched.

-Yonik
http://lucidimagination.com




> --
> Best regards, Nikolay Zamosenchuk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


Mime
View raw message