Hm, actually this post made me think, perhaps it would be a good idea to 
integrate some kind of client-side validation? So we could report back at least 
those "basic" JSON-format errors?

-Stefan 


On Wednesday, October 2, 2013 at 6:15 PM, Stefan Matheis wrote:

> Dennis
> 
> Have a look at the wiki .. last code-block in the section: 
> http://wiki.apache.org/solr/UpdateJSON#Example
> 
> -Stefan 
> 
> On Wednesday, October 2, 2013 at 5:46 PM, Dennis Brundage wrote:
> 
> > Is it possible to submit multiple JSON documents through the Solr Admin
> > Documents page?
> > 
> > The default json is: {"id":"change.me 
> > (http://change.me)","title":"change.me (http://change.me)"}. If I try to add
> > a second document such as {"id":"change.me2","title":"change.me 
> > (http://change.me)"}, and
> > submit them together, I get parsing errors. I have tried:
> > 
> > 1.
> > {"id":"change.me (http://change.me)","title":"change.me 
> > (http://change.me)"}{"id":"change2.me 
> > (http://change2.me)","title":"change.me2"}
> > 2.
> > {{"id":"change.me (http://change.me)","title":"change.me 
> > (http://change.me)"}{"id":"change2.me 
> > (http://change2.me)","title":"change.me2"}}
> > 3.
> > {"id":"change.me (http://change.me)","title":"change.me 
> > (http://change.me)"},{"id":"change2.me 
> > (http://change2.me)","title":"change.me2"}
> > 4.
> > {{"id":"change.me (http://change.me)","title":"change.me 
> > (http://change.me)"},{"id":"change2.me 
> > (http://change2.me)","title":"change.me2"}}
> > 
> > The parsing errors for items 2, 3 and 4 are (the parsing error for 1
> > indicates the need for either "," or "}" after the first json document.
> > 
> > "msg": "Expected string: char={,position=16 BEFORE='{\"add\":{ \"doc\":{{'
> > AFTER='\"id\":\"change.me (http://change.me)\",\"title\":\"change.me 
> > (http://change.me)\"}{\"'",
> > 
> > "msg": "Expected string: char={,position=54 BEFORE='{\"add\":{
> > \"doc\":{\"id\":\"change.me (http://change.me)\",\"title\":\"change.me 
> > (http://change.me)\"},{'
> > AFTER='\"id\":\"change.me2\",\"title\":\"change.me (http://change.me)\"},'",
> > 
> > "msg": "Expected string: char={,position=16 BEFORE='{\"add\":{ \"doc\":{{'
> > AFTER='\"id\":\"change.me (http://change.me)\",\"title\":\"change.me 
> > (http://change.me)\"},{'",
> > 
> > 
> > 
> > 
> > --
> > View this message in context: 
> > http://lucene.472066.n3.nabble.com/Submitting-Multiple-JSON-documents-from-Solr-Admin-Documents-tp4093155.html
> > Sent from the Solr - User mailing list archive at Nabble.com 
> > (http://Nabble.com).
> > 
> > 
> > 
> 
> 

Reply via email to