Hi Martin, I tested the same application SolrJ code on my system, it worked just fine on Solr 6.6.x. My Solrclient is "CloudSolrJClient", which I think doesn't make any difference. Can you show the response and field declarations if you are continuously facing the issue.
Amrit Sarkar Search Engineer Lucidworks, Inc. 415-589-9269 www.lucidworks.com Twitter http://twitter.com/lucidworks LinkedIn: https://www.linkedin.com/in/sarkaramrit2 Medium: https://medium.com/@sarkaramrit2 On Thu, Nov 9, 2017 at 1:55 PM, Martin Keller < martin.kel...@unitedplanet.com> wrote: > Hello, > > I’m trying to Update a field in a document via SolrJ. Unfortunately, while > the field itself is updated correctly, values of some other fields are > removed. > The code looks like this: > > SolrInputDocument updateDoc = new SolrInputDocument(); > > updateDoc.addField("id", "1234"); > > Map<String, Object> updateValue = new HashMap<>(); > updateValue.put("set", 1); > updateDoc.addField("fieldToUpdate", updateValue); > > final UpdateRequest request; > > request = new UpdateRequest(); > request.add(updateDoc); > > request.process(solrClient, "myCollection"); > solrClient.commit(); > > > If I send a similar request with curl, e.g. > > curl -X POST -H 'Content-Type: application/json' ' > http://localhost:8983/solr/myCollection/update' --data-binary > '[{"id":"1234", "fieldToUpdate":{"set":"1"}}]' > > it works as expected. > I’m using Solr 6.0.1, but the problem also occurs in 6.6.0. > > Any ideas? > > Thanks > Martin > >