[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    RE: IndexReader.deleteDocument(Term) in Lucene 3.6/4.0
From:       "Uwe Schindler" <uwe () thetaphi ! de>
Date:       2012-05-25 13:02:03
Message-ID: 000201cd3a76$94cce3e0$be66aba0$ () thetaphi ! de
[Download RAW message or body]

To change the behaviour of IndexReaders use FilterIndexReader, don't
subclass IndexReader's directly.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Nikolay Zamosenchuk [mailto:nikolazius@gmail.com]
> Sent: Friday, May 25, 2012 2:45 PM
> To: java-user@lucene.apache.org
> Subject: IndexReader.deleteDocument(Term) in Lucene 3.6/4.0
> 
> Hi everyone. We are using IndexReader.deleteDocument(Term) method to
> delete documents, since it returns the number of deleted documents.
> This is used to be sure that some docs were removed. We must know for sure
if
> documents were deleted. But in lucene 3.6 this method is final and can't
be
> overridden in our codebase anymore. Method
> IndexWriter.deleteDocument(..) is not final and possibly can be used in
our
> project, but doesn't return any value so we can't be sure whether ant
> documents were deleted. So briefly
> IndexReader.deleteDocument(Term) is a final but returns number of
deletions
> performed and IndexWriter.deleteDocument(..) is not final, but doesn't
return
> any result. Our functionality requires overriding and result value.
> 
> Can anyone please suggest how to solve this issue? Can simply run term
query
> before, but it seems to be absolutely inefficient.
> 
> --
> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic