public function DummySolr::search in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 tests/Dummy_Solr.php \DummySolr::search()
- 7 tests/Dummy_Solr.php \DummySolr::search()
Simple Search interface
Parameters
string $query The raw query string:
array $params key / value pairs for other query parameters (see Solr documentation), use arrays for parameter keys used more than once (e.g. facet.field):
Return value
response object
Throws
Exception If an error occurs during the service call
Overrides DrupalApacheSolrServiceInterface::search
File
- tests/
Dummy_Solr.php, line 230 - Dummy object to simulate a Solr Service
Class
- DummySolr
- @file Dummy object to simulate a Solr Service
Code
public function search($query = '', array $params = array(), $method = 'GET') {
$this->last_search = array(
'query' => $query,
'params' => $params,
'method' => $method,
);
$response = new stdClass();
$response->response = new stdClass();
$response->response->numFound = 0;
$response->response->docs = array();
return $response;
}