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 "UpdateJSON" by HossMan
Date Fri, 22 Feb 2013 18:27:54 GMT
Dear Wiki user,

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

The "UpdateJSON" page has been changed by HossMan:
http://wiki.apache.org/solr/UpdateJSON?action=diff&rev1=14&rev2=15

Comment:
array of json docs is alias for add, can't just send one json doc

  Example:
  {{{
  curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
+ [
   {
    "id"        : "TestDoc1",
    "title"     : {"set":"test1"},
    "revision"  : {"inc":3},
    "publisher" : {"add":"TestPublisher"}
+  },
+  {
+   "id"        : "TestDoc2",
+   "publisher" : {"add":"TestPublisher"}
-  }'
+  }
+ ]'
  }}}
  
  === Atomic Updates with Optimistic Concurrency ===
@@ -158, +164 @@

  Example:
  {{{
  curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
+ [
   {
    "id"        : "TestDoc1",
    "title"     : {"set":"test1"},
    "revision"  : {"inc":3},
    "publisher" : {"add":"TestPublisher"}
    "_version_" : {12345}
-  }'
+  }
+ ]'
  }}}
  

Mime
View raw message