lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "UpdateXmlMessages" by MarkusJelsma
Date Thu, 09 Dec 2010 16:14:54 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "UpdateXmlMessages" page has been changed by MarkusJelsma.
The comment on this change is: info on update with add and delete.
http://wiki.apache.org/solr/UpdateXmlMessages?action=diff&rev1=27&rev2=28

--------------------------------------------------

  http://localhost:8983/solr/update?stream.body=%3Ccommit/%3E
  }}}
  
+ === Add and delete in a single batch ===
+ Mixing add and delete elements in a single batch will throw an ''Illegal to have multiple
roots (start tag in epilog?)'' exception ([[https://issues.apache.org/jira/browse/SOLR-2277|SOLR-2277]]):
+ {{{
+ curl http://127.0.0.1:8983/solr/update/?commit=true -H "Content-Type: text/xml" --data-binary
'<add><doc><field name="id">17</field></doc></add><delete><id>1234</id></delete>';

+ }}}
+ 
+ Instead, the add and delete elements must be enclosed in within an update element:
+ 
+ {{{
+ curl http://127.0.0.1:8983/solr/update/?commit=true -H "Content-Type: text/xml" --data-binary
'<update><add><doc><field name="id">17</field></doc></add><delete><id>1234</id></delete></update>';
+ }}}
+ 

Mime
View raw message