Class Searcher
The searcher class provides all you need to query your ElasticSearch
server.
Methods summary
public static
array
|
#
search( string $search, integer $pageIndex = 0, integer $size = 10, array $facets = array(), boolean $sortByDate = false )
Initiate a search with the ElasticSearch server and return the results. Use
Faceting to manipulate URLs.
Initiate a search with the ElasticSearch server and return the results. Use
Faceting to manipulate URLs.
Parameters
- $search
string $search A space delimited list of terms to search for
- $pageIndex
integer $pageIndex The index that represents the current page
- $size
integer $size The number of results to return per page
- $facets
array $facets An object that contains selected facets (typically the query string, ie:
$_GET)
- $sortByDate
boolean $sortByDate If false, results will be sorted by score (relevancy)
Returns
array The results of the search
See
|