XML格式的solr原子更新

时间:2014-09-05 12:37:11

标签: solr lucene solrj solrcloud

这是JSON格式的原子更新体。我复制了here

中的代码
{"id":"mydoc","price":{"set":99},"popularity":{"inc":20},"categories":{"add":["toys","games"]}, "promo_ids":{"remove":"a123x"}, "tags":{"remove":["free_to_try","on_sale"]}}

如何以XML格式编写相同内容?

1 个答案:

答案 0 :(得分:3)

有关XML更新格式,请参阅Wiki页面上的section for Optional Attributes

<add>
  <doc>
    <field name="employeeId">05991</field>
    <field name="office" update="set">Walla Walla</field>
    <field name="skills" update="add">Python</field>
  </doc>
</add>