Elgg
Version master
|
Public Member Functions | |
__construct (protected Config $config, protected EventsService $events, protected Database $db) | |
Constructor. More... | |
search (array $options=[]) | |
Returns search results as an array of entities, as a batch, or a count, depending on parameters given. More... | |
normalizeOptions (array $options=[]) | |
Normalize options. More... | |
prepareSearchOptions (array $options=[]) | |
Prepare ege* options. More... | |
normalizeQuery (array $options=[]) | |
Normalize query parts. More... | |
normalizeSearchFields (array $options=[]) | |
Normalizes an array of search fields. More... | |
buildSearchWhereQuery (QueryBuilder $qb, $alias, $fields, $query_parts, $partial_match=true) | |
Builds search clause. More... | |
Search service.
Definition at line 22 of file SearchService.php.
Elgg\Search\SearchService::__construct | ( | protected Config | $config, |
protected EventsService | $events, | ||
protected Database | $db | ||
) |
Constructor.
Definition at line 33 of file SearchService.php.
Elgg\Search\SearchService::buildSearchWhereQuery | ( | QueryBuilder | $qb, |
$alias, | |||
$fields, | |||
$query_parts, | |||
$partial_match = true |
|||
) |
Builds search clause.
QueryBuilder | $qb | Query builder |
string | $alias | Entity table alias |
array | $fields | Fields to match against |
array | $query_parts | Search query |
bool | $partial_match | Allow partial matches |
Definition at line 279 of file SearchService.php.
Elgg\Search\SearchService::normalizeOptions | ( | array | $options = [] | ) |
Normalize options.
array | $options | Options |
Definition at line 104 of file SearchService.php.
Elgg\Search\SearchService::normalizeQuery | ( | array | $options = [] | ) |
Normalize query parts.
array | $options | Options |
Definition at line 153 of file SearchService.php.
Elgg\Search\SearchService::normalizeSearchFields | ( | array | $options = [] | ) |
Normalizes an array of search fields.
array | $options | Search parameters |
Definition at line 188 of file SearchService.php.
Elgg\Search\SearchService::prepareSearchOptions | ( | array | $options = [] | ) |
Prepare ege* options.
array | $options | Entity search params |
Definition at line 132 of file SearchService.php.
Elgg\Search\SearchService::search | ( | array | $options = [] | ) |
Returns search results as an array of entities, as a batch, or a count, depending on parameters given.
array | $options | Search parameters Accepts all options supported by elgg_get_entities() |
string $query Search query string $type Entity type. Required if no search type is set string $search_type Custom search type. Required if no type is set array $fields An array of fields to search in string $sort An array containing 'property', 'property_type', 'direction' and 'signed' bool $partial_match Allow partial matches, e.g. find 'elgg' when search for 'el' bool $tokenize Break down search query into tokens, e.g. find 'elgg has been released' when searching for 'elgg released'
DomainException |
Definition at line 61 of file SearchService.php.