Thread update: When I use a simple:
*Map operation = new HashMap();* Instead of: *Map<String, List<String>> operation = new HashMap<String, List<String>>();* The result looks better, but it´s still wrong: fieldName: [ "[Value1, Value2]" ], However, List<String> value is received as a simple String "[Value1, Value2]". In other words, SolrJ is internally executing a toString() operation to the List<Sring>. Is impossible to update atomically a multivalued field with a List of values in just one atomic update operation? Regards, - Luis Cappa. 2012/11/15 Luis Cappa Banda <luisca...@gmail.com> > Hello everyone, > > I´ve tested atomic updates via Ajax calls and now I´m starting with atomic > updates via SolrJ... but the way I´m proceeding doesn´t seem to work well. > Here is the snippet: > > *SolrInputDocument do = ne SolrInputDocument();* > *doc.addField("id", "myId");* > * > * > *Map<String, List<String>> operation = new HashMap<String, > List<String>>();* > *operation.put("set", [[a list of String elements]]); // I want a set > operation to override field values.* > *doc.addField("fieldName", operation);* > * > * > *cloudSolrServer.add(doc); // Atomic update operation.* > > > And after updating the resultant doc is as follows: > > *doc: {* > * > * > *...* > * > * > *fieldName: [ "{set=values}"* > *],* > * > * > *...* > > * > * > > *}* > > In other words, the map which includes the "set" operation and the field > values is String formatted and that String is used to update the field, :-/ > > What is the correct way to update just one or more fields with SolrJ? > > > Regards, > > -- > > - Luis Cappa > > -- - Luis Cappa