You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Glenn <so...@t2.zazu.com> on 2011/08/23 20:17:42 UTC
Batch updates order guaranteed?
Hello,
Question about batch updates (performing a delete and add in same
request, as described at bottom
of http://wiki.apache.org/solr/UpdateXmlMessages):
<http://wiki.apache.org/solr/UpdateXmlMessages%29:> is the order
guaranteed? If a <delete> is followed by an <add>, 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 <add>, but we have a need to do some
clean up of certain related documents. The initial delete-by-query will
ensure that the subsequent <add> will cleanly update some possible old,
improper documents, but if the <delete> might ever be performed after
the <add>, it would end up removing the new document as well.)
Thanks!
Glenn
Re: Batch updates order guaranteed?
Posted by Glenn <so...@t2.zazu.com>.
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 <so...@t2.zazu.com> wrote:
>> Question about batch updates (performing a delete and add in same
>> request, as described at bottom
>> of http://wiki.apache.org/solr/UpdateXmlMessages):
>> <http://wiki.apache.org/solr/UpdateXmlMessages%29:> is the order
>> guaranteed? If a <delete> is followed by an <add>, 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?
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Aug 23, 2011 at 3:38 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Tue, Aug 23, 2011 at 2:17 PM, Glenn <so...@t2.zazu.com> wrote:
>> Question about batch updates (performing a delete and add in same
>> request, as described at bottom
>> of http://wiki.apache.org/solr/UpdateXmlMessages):
>> <http://wiki.apache.org/solr/UpdateXmlMessages%29:> is the order
>> guaranteed? If a <delete> is followed by an <add>, 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?
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Aug 23, 2011 at 2:17 PM, Glenn <so...@t2.zazu.com> wrote:
> Question about batch updates (performing a delete and add in same
> request, as described at bottom
> of http://wiki.apache.org/solr/UpdateXmlMessages):
> <http://wiki.apache.org/solr/UpdateXmlMessages%29:> is the order
> guaranteed? If a <delete> is followed by an <add>, 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