lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Submitting Multiple JSON documents from Solr Admin Documents
Date Wed, 02 Oct 2013 16:21:16 GMT
Use square brackets (array) around a list of documents:

[{"id":"change.me","title":"change.me"},{"id":"change2.me","title":"change.me2"}]

-- Jack Krupansky

-----Original Message----- 
From: Dennis Brundage
Sent: Wednesday, October 02, 2013 11:46 AM
To: solr-user@lucene.apache.org
Subject: Submitting Multiple JSON documents from Solr Admin Documents

Is it possible to submit multiple JSON documents through the Solr Admin
Documents page?

The default json is: {"id":"change.me","title":"change.me"}. If I try to add
a second document such as {"id":"change.me2","title":"change.me"}, and
submit them together, I get parsing errors.  I have tried:

1.
{"id":"change.me","title":"change.me"}{"id":"change2.me","title":"change.me2"}
2.
{{"id":"change.me","title":"change.me"}{"id":"change2.me","title":"change.me2"}}
3.
{"id":"change.me","title":"change.me"},{"id":"change2.me","title":"change.me2"}
4.
{{"id":"change.me","title":"change.me"},{"id":"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\",\"title\":\"change.me\"}{\"'",

"msg": "Expected string: char={,position=54 BEFORE='{\"add\":{
\"doc\":{\"id\":\"change.me\",\"title\":\"change.me\"},{'
AFTER='\"id\":\"change.me2\",\"title\":\"change.me\"},'",

"msg": "Expected string: char={,position=16 BEFORE='{\"add\":{ \"doc\":{{'
AFTER='\"id\":\"change.me\",\"title\":\"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. 


Mime
View raw message