Re: Updating document with the Solr Java API

2012-08-07 Thread Sami Siren
On Tue, Jul 31, 2012 at 5:16 PM, Jonatan Fournier wrote: > Hi, > > What is the Java syntax to create an update document? Currently to update a field in a document with solrj you need to do something like this: doc = new SolrInputDocument(); doc.addField("id", "unique"); doc.addField(

Re: Updating document with the Solr Java API

2012-07-31 Thread Jonatan Fournier
On Tue, Jul 31, 2012 at 10:16 AM, Jonatan Fournier wrote: > Hi, > > What is the Java syntax to create an update document? > > I was using this in JSON to update/reset some fields of document 12345 > (it contains other fields, only updating those): > > { > "add" : { > "doc" : { > "id":"

Updating document with the Solr Java API

2012-07-31 Thread Jonatan Fournier
Hi, What is the Java syntax to create an update document? I was using this in JSON to update/reset some fields of document 12345 (it contains other fields, only updating those): { "add" : { "doc" : { "id":"12345", "foo":{"set":null}, "bar":{"set":"baz"} } } } Now I