You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/02/22 19:27:54 UTC
[Solr Wiki] Update of "UpdateJSON" by HossMan
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}
- }'
+ }
+ ]'
}}}