Using scala + solrj. I need to read document from solr, add field to it and then to put it back in the server.
I've used something like the following code (as said, code is in scala):
val doc = client.getById(docId) // can be as result of query also
val inputDoc = ClientUtils.toSolrInputDocument(doc)
inputDoc.setField("_version_",0)
inputDoc.setField("new_field","new value")
client.add(inputDoc)
client.commit
Since solr 5.5 ClientUnits.toSolrInputDocument is deprecated. How should I do this now?
Many Thanks.