title: solrj api for partial document update
body: <p>Solr 4 beta is out, the GA version will follow soon. Partial document updates has been around for a while as explained here: <a href="http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/">http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/</a></p>
  
  <p>However, I haven't figured out how to do it with solrj api.</p>
  
  <p>Does anyone knows if it is possible with solrj? Or is solrj just not up-to-speed with this feature?</p>
  
  <p><strong>update:</strong> as I describe in the mailing list (see reply <a href="http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201209.mbox/%3C7E0464726BD046488B66D661770F9C2F01B02EFF0C@TLVMBX01.nice.com%3E">here</a>), I found that in the solrj api, the value of a SolrInputField can be a map - it doesn't have to be a simple scalar value.
  If it is a map, solrj adds an additional <code>update</code> attribute to the field's xml element.
  For example,
  This code:</p>
  
  <pre><code>SolrInputDocument doc = new SolrInputDocument();
  Map&lt;String, String&gt; partialUpdate = new HashMap&lt;String, String&gt;();
  partialUpdate.put("set", "foo");
  doc.addField("id", "test_123");
  doc.addField("description", partialUpdate);
  </code></pre>
  
  <p>yields this document:</p>
  
  <pre><code>&lt;doc boost="1.0"&gt;
      &lt;field name="id"&gt;test_123&lt;/field&gt;
      &lt;field name="description" update="set"&gt;foo&lt;/field&gt;
  &lt;/doc&gt;
  </code></pre>
  
  <p>In this example I used the word "set" for this additional attribute, but it doesn't work.
  Solr doesn't update the field as I expected.
  According to this link: 
  <a href="http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/">http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/</a>
  valid values are "set" and "add".</p>
  
  <p>Any idea?</p>