createUpdate(); // create a new document for the data $doc1 = $update->createDocument(); $doc1->id = 123; $doc1->name = 'testdoc-1'; $doc1->price = 364; // and a second one $doc2 = $update->createDocument(); $doc2->id = 124; $doc2->name = 'testdoc-2'; $doc2->price = 340; // add the documents and a commit command to the update query $update->addDocuments(array($doc1, $doc2)); $update->addCommit(); // this executes the query and returns the result $result = $client->update($update); echo 'Update query executed
'; echo 'Query status: ' . $result->getStatus(). '
'; echo 'Query time: ' . $result->getQueryTime(); htmlFooter();