I am using solr 6.0
version.
This is my data
{
"id" : "14",
"solrid" : "solr|school|14",
"name" : "test update solr 14",
"status" : "pending",
"state" : "Andhra Pradesh",
"board" : "CISCE",
"updated" : "2016-05-26T02:24:25Z",
"pincode" : "0"
}
I want to update the data on document as per id. example i want to change the name
$doc = $update->createDocument();
$doc["id"] =$id;
$doc["name"]="school";
$update->addDocument($doc);
$update->addCommit();
$client->update($update);
This code is correct? Or i want to use other flow. PHP Solarium code.