source: sandbox/expresso-solr/expressoMail1_2/inc/solrclient/examples/2.2.4-optimize.php @ 7576

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

Line 
1<?php
2
3require('init.php');
4htmlHeader();
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
18echo '<b>Update query executed</b><br/>';
19echo 'Query status: ' . $result->getStatus(). '<br/>';
20echo 'Query time: ' . $result->getQueryTime();
21
22htmlFooter();
Note: See TracBrowser for help on using the repository browser.