On 3/28/2014 1:02 PM, Jean-Sebastien Vachon wrote:
I`d like to know how (it is possible) to update a field`s value using SolrJ. I
looked at the API and could not figure it out so for now I'm using the
UpdateHandler by sending it a JSON formatted document illustrating the required
changes.
Is there a way to do the same through SolrJ?
The feature you are after is called Atomic Updates. In order to use
this feature *all* of your fields must be stored, except for copyField
destinations. See especially the "Caveats and Limitations" section of
the first link below:
http://wiki.apache.org/solr/Atomic_Updates
https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents
To do this with SolrJ, you must use a Map for the field value instead of
just one or more regular values:
http://stackoverflow.com/questions/16234045/solr-how-to-use-the-new-field-update-modes-atomic-updates-with-solrj
Thanks,
Shawn