Re: Batch updates order guaranteed?

2011-08-23 Thread Yonik Seeley
On Tue, Aug 23, 2011 at 3:38 PM, Yonik Seeley
 wrote:
> On Tue, Aug 23, 2011 at 2:17 PM, Glenn  wrote:
>> Question about batch updates (performing a delete and add in same
>> request, as described at bottom
>> of http://wiki.apache.org/solr/UpdateXmlMessages):
>>   is the order
>> guaranteed?  If a  is followed by an , will the delete
>> always be performed first?  I would assume so but would like to get
>> confirmation.
>
> Yes, if you're crafting the update message yourself in XML or JSON.
> SolrJ is a different matter I think.

Found the SolrJ issue:
https://issues.apache.org/jira/browse/SOLR-1162

Looks like it sort of got dropped, but I think this is worth fixing.

-Yonik
http://www.lucidimagination.com


Re: Batch updates order guaranteed?

2011-08-23 Thread Glenn
Yes, I'm crafting the XML update message myself.

Thanks for the confirmation.

Glenn

--

On 8/23/11 1:38 PM, Yonik Seeley wrote:
> On Tue, Aug 23, 2011 at 2:17 PM, Glenn  wrote:
>> Question about batch updates (performing a delete and add in same
>> request, as described at bottom
>> of http://wiki.apache.org/solr/UpdateXmlMessages):
>>   is the order
>> guaranteed?  If a  is followed by an , will the delete
>> always be performed first?  I would assume so but would like to get
>> confirmation.
> Yes, if you're crafting the update message yourself in XML or JSON.
> SolrJ is a different matter I think.
>
> -Yonik
> http://www.lucidimagination.com


Re: Batch updates order guaranteed?

2011-08-23 Thread Yonik Seeley
On Tue, Aug 23, 2011 at 2:17 PM, Glenn  wrote:
> Question about batch updates (performing a delete and add in same
> request, as described at bottom
> of http://wiki.apache.org/solr/UpdateXmlMessages):
>   is the order
> guaranteed?  If a  is followed by an , will the delete
> always be performed first?  I would assume so but would like to get
> confirmation.

Yes, if you're crafting the update message yourself in XML or JSON.
SolrJ is a different matter I think.

-Yonik
http://www.lucidimagination.com


Batch updates order guaranteed?

2011-08-23 Thread Glenn
Hello,

Question about batch updates (performing a delete and add in same
request, as described at bottom
of http://wiki.apache.org/solr/UpdateXmlMessages):
  is the order
guaranteed?  If a  is followed by an , will the delete
always be performed first?  I would assume so but would like to get
confirmation.

(I realize that it is not normally necessary to explicitly delete a
document before updating with an , but we have a need to do some
clean up of certain related documents.  The initial delete-by-query will
ensure that the subsequent  will cleanly update some possible old,
improper documents, but if the  might ever be performed after
the , it would end up removing the new document as well.)

Thanks!

Glenn