Which is faster -- delete or update?

2010-11-01 Thread Andy
My documents have a down_vote field. Every time a user votes down a document, I increment the down_vote field in my database and also re-index the document to Solr to reflect the new down_vote value. During searches, I want to restrict the results to only documents with, say fewer than 3

Re: Which is faster -- delete or update?

2010-11-01 Thread Peter Karich
From the user perspective I wouldn't delete it, because it could be that down-voting by mistake or spam or something and up-voting can resurrect it. It could be also wise to keep the docs to see which content (from which users?) are down voted to get spam accounts? From the dev perspective

Re: Which is faster -- delete or update?

2010-11-01 Thread Erick Erickson
Just deleting a document is faster because all that really happens is the document is marked as deleted. An update is really a delete followed by an add of the same document, so by definition an update will be slower... But... does it really make a difference? How often to you expect this to

Re: Which is faster -- delete or update?

2010-11-01 Thread Jonathan Rochkind
The actual time it takes to delete or update the document is unlikely to make a difference to you. What might make a difference to you is the time it takes to actually finalize the commit, and the time it takes to re-warm your indexes after a commit, and especially the time it takes to run