> Is there some place I should indicate what parameters are including in > the json objects send? I was able to test books.json without the > error.
Yes, in Solr's schema.xml (under the conf/ directory). See <http://wiki.apache.org/solr/SchemaXml> for more details. Erik On Mar 15, 2013, at 17:58 , Patrice Seyed wrote: > Hi all, > > Running the solr server: > > ~/solr-4.1.0/example$ java -jar start.jar > > For updating solr with json, I followed the convention at: > example/examplesdocs/books.json > > which has: > [ > { > "id" : "978-0641723445",^M > "cat" : ["book","hardcover"],^M > "name" : "The Lightning Thief",^M > "author" : "Rick Riordan",^M > "series_t" : "Percy Jackson and the Olympians",^M > "sequence_i" : 1,^M > "genre_s" : "fantasy",^M > "inStock" : true,^M > "price" : 12.50,^M > "pages_i" : 384^M > }, > > ... > > ] > > My json file is structured as follows: > [ > {"id":"doi:10.6085\/AA\/CBLX00_XXXITBDXLSR01_20040221.50.4","datasource":"urn:node:PISCO","abstract":"This > metadata record describes a mix of intertidal seawater and air > temperature data collected at Cape Blanco, Oregon, USA, by PISCO. > Measurements were collected using StowAway TidbiT Temperature Loggers > (Onset Computer Corp. TBI32-05+37) beginning 2004-02-21. Site > temperature loggers are bolted down in a wire cage at three locations > within each site near MLLW. Temperature is recorded at 1 hour > intervals.","title":"PISCO: Intertidal: site temperature data: Cape > Blanco, Oregon, USA (CBLX00)","project":"Partnership for > Interdisciplinary Studies of Coastal Oceans (PISCO)","author":"Bruce > Menge","contactOrganization":["Partnership for Interdisciplinary > Studies of Coastal Oceans (PISCO)","PISCO"],"keywords":["EARTH SCIENCE > : Oceans : Ocean Temperature : Water > Temperature","Temperature","Integrated Ocean Observing > System","IOOS","Oceanographic Sensor Data","Intertidal Temperature > Data","continental shelf","seawater","temperature","Oregon","United > States of America","PISCO"]}, > > ... > > ] > > Per the documentation at: > http://wiki.apache.org/solr/UpdateJSON > > attempted post of json with: > curl 'http://localhost:8983/solr/update/json?commit=true' > --data-binary @datafile.json -H 'Content-type:application/json' > > received the following status 400: > > {"responseHeader":{"status":400,"QTime":1},"error":{"msg":"ERROR: > [doc=doi:10.6073/AA/knb-lter-bes.14.45] unknown field > 'datasource'","code":400}} > /Applications/MAMP/htdocs$ > > Is there some place I should indicate what parameters are including in > the json objects send? I was able to test books.json without the > error. > > Thanks in advance, > Patrice