lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Submitting Multiple JSON documents from Solr Admin Documents
Date Wed, 02 Oct 2013 17:50:02 GMT

: After putting brackets around the doucments:
: [{"id":"","title":""},{"id":"","title":"change.me2"}] 
: I get the following error:

There are two ways of submitting JSON using the /documents screen...

1) select "JSON" from the pulldown...

this accepts only a single JSON document to be added, because it wraps 
it in tags like so...

{"add":{ "doc": YOUR_TEXT_AREA_INPUT,
         "boost": BOOST_FORM_INPUT,
         "overwrite": CHECKBOX_INPUT,
         "commitWithin": COMMIT_WITHIN_FORM_INPUT } }

(likewise, similar wrapper tags are added if you select "XML" from the 

2) select "Solr command (raw XML or JSON)" from the pulldown...

this accepts any arbitrary xml or json you wish to post, and you can do 
multiple documents using the json array notation -- the UI doesn't touch 
what you give it at all.

(NOTE: if you change the "Update Handler" text box at teh top of the page 
to "/debug/dump" -- using the example configs -- you can see solr echo 
back exactly what the UI is sending when you submit the form)


View raw message