So in your UI, you'd like the delete to happen immediately and then
it's OK if the updated (added) document then takes a minute to appear?
OK, I agree this (the immediacy of doing deletes via IndexReader) is a
good reason to keep IndexReader.deleteDocument for now.
Mike
Ganesh wrote:
I have to Tag a document based on User request. On deletion, I
should do 'marked for delete' and on document state change, i need
to update the document.
Update internally does delete and add. I am commiting the writer and
re-opening the reader, every minute.
Consider, In a minute, lets say User has deleted a document from the
UI.
If i use IndexWriter, then it is updating the document. but it is
getting refreshed only after a minute. If User refreshes his page,
then he could see the deleted item again.
In order to avoid this situitation, i need to plan
1. Delete the document using reader
2. Add the document with new state using Writer.
I think, we can't avoid using DeleteDocument of Reader. Suggest me,
if there is any other way.
Regards
Ganesh
----- Original Message ----- From: "Antony Bowesman"
<[EMAIL PROTECTED]>
To: <java-user@lucene.apache.org>
Sent: Wednesday, November 26, 2008 4:00 AM
Subject: Re: Which is faster/better
Michael McCandless wrote:
If you have nothing open already, and all you want to do is delete
certain documents and make a commit point, then using IndexReader vs
IndexWriter should show very little difference in speed.
Thanks. This use case can assume there may be nothing open. I
prefer IndexWriter as delete=write is a much clearer concept that
delete=read...
As of 2.4, IndexWriter now provides delete-by-Query, which I think
ought to meet nearly all of the cases where someone wants to
delete-by-docID using IndexReader.
Yes, that is an excellent addition. Up to now, our only use case
for delete-by-docId is to perform a dBQ and so far, we have been
using your suggestion from last year about how to do delete
documents for ALL terms.
Antony
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]