How to add multiple JSON documents through the Solr Admin Documents page?
I tried with json:
[ 
{ 
   "id" : "001", 
   "name" : "Ram", 
   "age" : 53, 
   "Designation" : "Manager", 
   "Location" : "Hyderabad", 
}, 
{ 
   "id" : "002", 
   "name" : "Robert", 
   "age" : 43, 
   "Designation" : "SR.Programmer", 
   "Location" : "Chennai", 
}, 
{ 
   "id" : "003", 
   "name" : "Rahim", 
   "age" : 25, 
   "Designation" : "JR.Programmer", 
   "Location" : "Delhi", 
} 
]
After click Submit Document, it returns errors:
Status: error Error: Bad Request "msg": "Expected: OBJECT_START but got ARRAY_START at [16]", "code": 400
Remove the [ ] bracket, this works for me.
{ 
      "id" : "001", 
      "name" : "Ram", 
      "age" : 53, 
      "Designation" : "Manager", 
      "Location" : "Hyderabad" 
   }, 
   { 
      "id" : "002", 
      "name" : "Robert", 
      "age" : 43, 
      "Designation" : "SR.Programmer", 
      "Location" : "Chennai"
   }, 
   { 
      "id" : "003", 
      "name" : "Rahim", 
      "age" : 25, 
      "Designation" : "JR.Programmer", 
      "Location" : "Delhi" 
   } 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With