On 10-Oct-07, at 12:49 PM, BrendanD wrote:


We simply process a queue of updates from a database table. Some of the updates are deletes, some are adds. Sometimes you can have many deletes in a row, sometimes many adds in a row, and sometimes a mixture of deletes and adds. We're trying to batch our updates and were hoping to avoid having to
manage separate files for adds and deletes.

Perhaps a single top-level tag e.g. <update>....</update> could contain
deletes and adds in the same document?

This would be very complicated from a standpoint of returning errors to the client.

Keep in mind the <deletes> can never be batched, regardless. The only command that supports batching is <update> (and it is 1 <update> with multiple <doc>s, not multiple <update>s).

If you keep a persistent connection open to solr, I don't see why one command per request should be limiting.

Note also that you can batch on your end. If the deletes are doc ids, then you can collect a bunch at once and do <delete><query>id:xxx id:yyy id:zzz id:aaa id:bbb</query></delete> to perform them all at once.

-Mike

Reply via email to