Revision 7588,
555 bytes
checked in by adir, 11 years ago
(diff) |
Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade
|
Rev | Line | |
---|
[7588] | 1 | <?php |
---|
| 2 | |
---|
| 3 | require('init.php'); |
---|
| 4 | htmlHeader(); |
---|
| 5 | |
---|
| 6 | // create a client instance |
---|
| 7 | $client = new Solarium_Client($config); |
---|
| 8 | |
---|
| 9 | // get an update query instance |
---|
| 10 | $update = $client->createUpdate(); |
---|
| 11 | |
---|
| 12 | // add the delete query and a commit command to the update query |
---|
| 13 | $update->addDeleteQuery('name:testdoc*'); |
---|
| 14 | $update->addCommit(); |
---|
| 15 | |
---|
| 16 | // this executes the query and returns the result |
---|
| 17 | $result = $client->update($update); |
---|
| 18 | |
---|
| 19 | echo '<b>Update query executed</b><br/>'; |
---|
| 20 | echo 'Query status: ' . $result->getStatus(). '<br/>'; |
---|
| 21 | echo 'Query time: ' . $result->getQueryTime(); |
---|
| 22 | |
---|
| 23 | htmlFooter(); |
---|
Note: See
TracBrowser
for help on using the repository browser.