Your code isn't changing anything, since you've commented out the .add
command. And you have to use the actual ID in the ID field, since Solr won't know what document to update otherwise. The field you're changing should have the fieldModifier attached:
SolrInputDocument doc = new SolrInputDocument();Map<String, String> fieldModifier = new HashMap<String, String>();// Change ModifyScore to the new value, since you're just using the current value now..fieldModifier.put("set", ModifyScore);doc.addField("ID", Mscore);doc.addField("Author", fieldModifier);solr.add(doc);solr.commit();