Apache_Solr_Service::search
Simple Search interface
Signature
public function search(string
$query,
[integer
$offset = 0,
[integer
$limit = 10,
[array
$params = ,
[string
$method = self::METHOD_GET]]]] )
Parameters
$query
—
string
- The raw query string
$offset
—
integer
- The starting offset for result documents
$limit
—
integer
- The maximum number of result documents to return
$params
—
array
- key / value pairs for other query parameters (see Solr documentation), use arrays for parameter keys used more than once (e.g. facet.field)
$method
—
string
- The HTTP method (Apache_Solr_Service::METHOD_GET or Apache_Solr_Service::METHOD::POST)
Returns
- Apache_Solr_Response
Errors/Exceptions
-
Apache_Solr_HttpTransportException
- If an error occurs during the service call
-
Apache_Solr_InvalidArgumentException
- If an invalid HTTP method is used