I use the following code to change specific field value.
SolrInputDocument solrdoc=new SolrInputDocument();
solrdoc.addField("id","book001");
Map<String,Object> fieldModifier=new HashMap<>(1);
fieldModifier.put("set","book_new_name");
solrdoc.addField("name",fieldModifier);
But I cannot use the similar code to change Solr unique document id, exception is thrown.
solrdoc.addField("id",fieldModifier);
Is there any solution to change the Solr document id?