_client->registerQueryType(
Solarium_Client::QUERYTYPE_SELECT,
'MyQuery',
'Solarium_Client_RequestBuilder_Select',
'Solarium_Client_ResponseParser_Select'
);
}
}
htmlHeader();
// create a client instance and register the plugin
$client = new Solarium_Client($config);
$client->registerPlugin('querycustomizer', 'queryCustomizer');
// create a select query instance
$query = $client->createSelect();
// check the query class, it should be our custom query class
echo 'Query class: ' . get_class($query) . '
';
// execute the query and display the results
$resultset = $client->select($query);
echo 'NumFound: '.$resultset->getNumFound();
foreach ($resultset as $document) {
echo '
' . $field . ' | ' . $value . ' |
---|