Revision 7576,
486 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 | |
---|
[7576] | 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 | // optimize the index |
---|
| 13 | $update->addOptimize(true, false, 5); |
---|
| 14 | |
---|
| 15 | // this executes the query and returns the result |
---|
| 16 | $result = $client->update($update); |
---|
| 17 | |
---|
| 18 | echo '<b>Update query executed</b><br/>'; |
---|
| 19 | echo 'Query status: ' . $result->getStatus(). '<br/>'; |
---|
| 20 | echo 'Query time: ' . $result->getQueryTime(); |
---|
| 21 | |
---|
| 22 | htmlFooter(); |
---|
Note: See
TracBrowser
for help on using the repository browser.