On 10/01/2008, at 22:51, Chris Hostetter wrote:


: Can this be done on the same request? Because I am sending them on diferent : requests... wich suck... already dividing inserts and deletes in 2 requests is
: bad enough.

if you use persistent HTTP connections (ie: keep-alive) the network
overhead goes away, and there should be negligable difference between one request per delete and 'batched' dleetes (let alone 2 requests: one for
inserts and 1 for deletes).

incidently: you aren't deleting docs just so you can add new versions of them are you? assuming you have a uniqueKey field you can just read add
the docs and Solr will take care of deleting the old version.


No, actually my problem is that the solr index is mirroring data on a database (a Zope app to be more acurate) so it would be better if I could send the whole transaction together so I don't have to keep it on separate files... wich I have to do so I can not send anything if the transaction is aborted (I can't abort a solr add right?).

Maybe I should explain more, but I think this is pretty comon to anyone trying to keep database transactions and a solr index in sync, as solr doesn't support two phase commit or anything like that.


--
Leonardo Santagada



Reply via email to