I understand that (at least) from versions 4.0 and older from solr, this is fixed. Take a look at http://wiki.apache.org/solr/UpdateJSON .
B. / exampledocs / books.json is an example json file with multiple documents.
[ { "id" : "978-0641723445", "cat" : ["book","hardcover"], "name" : "The Lightning Thief", "author" : "Rick Riordan", "series_t" : "Percy Jackson and the Olympians", "sequence_i" : 1, "genre_s" : "fantasy", "inStock" : true, "price" : 12.50, "pages_i" : 384 } , { "id" : "978-1423103349", "cat" : ["book","paperback"], "name" : "The Sea of Monsters", "author" : "Rick Riordan", "series_t" : "Percy Jackson and the Olympians", "sequence_i" : 2, "genre_s" : "fantasy", "inStock" : true, "price" : 6.49, "pages_i" : 304 }, ... ]
While @fiskfisk's answer is still valid JSON, it is not easy to serialize from a data structure. It's one.
elachell
source share