lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <emailg...@yahoo.co.in>
Subject Re: Which is faster/better
Date Mon, 01 Dec 2008 04:34:48 GMT
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" <adb@teamware.com>
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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 

Send instant messages to your online friends http://in.messenger.yahoo.com 

---------------------------------------------------------------------
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