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 2011/05/04 22:37:52 UTC

[Solr Wiki] Update of "UpdateJSON" by YonikSeeley

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 YonikSeeley.
The comment on this change is: add a simple example for more than one doc at once.
http://wiki.apache.org/solr/UpdateJSON?action=diff&rev1=2&rev2=3

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

  }'
  curl "$URL?commit=true"
  }}}
+ 
+ Here's a simple example of adding more than one document at once:
+ {{{
+ curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
+ {
+  "add": {"doc": {"id" : "TestDoc1", "title" : "test1"} },
+  "add": {"doc": {"id" : "TestDoc2", "title" : "another test"} }
+ }'
+ }}}
+ 
  == Update Commands ==
  The JSON update handler accepts all of the types of update commands that the XML update handler supports, through a straightforward mapping.
  Please see the [[UpdateXmlMessages|documentation on XML updates]] for detailed descriptions of the commands.