Copied!

SearchServiceDecorator

SearchServiceDecorator.php : 18
Abstract
Implements SearchService

Properties

protected $innerService

SearchServiceDecorator.php : 20
protected SearchService $innerService

Methods

public__construct()

SearchServiceDecorator.php : 22
public __construct(SearchService $innerService)

Parameters

Name Type Default value Description
$innerService SearchService - -

publicfindContent()

SearchServiceDecorator.php : 27

Finds content objects for the given query.

public findContent(Query $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult<string|int, Content>

Parameters

Name Type Default value Description
$query Query - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently, supports two syntaxes:

  • ['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]
  • [<language_code_string>,…] where useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions bool true

if true (default), only the objects which the user is allowed to read are returned.

Return values

SearchResult<string|int, Content>

publicfindContentInfo()

SearchServiceDecorator.php : 35

Finds contentInfo objects for the given query.

public findContentInfo(Query $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult<string|int, ContentInfo>

This method works just like findContent, however does not load the full Content Objects. This means it can be more efficient for use cases where you don't need the full Content. Also including use cases where content will be loaded by separate code, like an ESI based sub requests that takes content ID as input.

Parameters

Name Type Default value Description
$query Query - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Currently, supports two syntaxes:

  • ['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]
  • [<language_code_string>,…] where useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions bool true

if true (default), only the objects which the user is allowed to read are returned.

Return values

SearchResult<string|int, ContentInfo>

publicfindLocations()

SearchServiceDecorator.php : 60

Finds Locations for the given query.

public findLocations(LocationQuery $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult<string|int, Location>

Parameters

Name Type Default value Description
$query LocationQuery - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently, supports two syntaxes:

  • ['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]
  • [<language_code_string>,…] where useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions bool true

if true (default), only the objects which the user is allowed to read are returned.

Return values

SearchResult<string|int, Location>

publicfindSingle()

SearchServiceDecorator.php : 43

Performs a query for a single content object.

public findSingle(CriterionInterface $filter[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : Content

Parameters

Name Type Default value Description
$filter CriterionInterface - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Currently, supports two syntaxes:

  • ['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]
  • [<language_code_string>,…] where useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions bool true

if true (default), only the objects which the user is allowed to read are returned.

Return values

Content

publicsuggest()

SearchServiceDecorator.php : 51

Suggests a list of values for the given prefix.

public suggest(string $prefix[, array<string|int, mixed> $fieldPaths = [] ][, int $limit = 10 ][, CriterionInterface|null $filter = null ]) : mixed

Parameters

Name Type Default value Description
$prefix string - -
$fieldPaths array<string|int, mixed> [] -
$limit int 10 -
$filter CriterionInterface|null null -

publicsupports()

SearchServiceDecorator.php : 68

Query for supported capability of currently configured search engine.

public supports(int $capabilityFlag) : bool

Will return false if search engine does not implement Capable.

Parameters

Name Type Default value Description
$capabilityFlag int -

One of the CAPABILITY_* constants (only a single one, not a bitwise combination): CAPABILITY_SCORING, \Ibexa\Contracts\Core\Repository\SearchService::CAPABILITY_FACETS, CAPABILITY_CUSTOM_FIELDS, CAPABILITY_SPELLCHECK,

CAPABILITY_SUGGEST, CAPABILITY_ADVANCED_FULLTEXT, or CAPABILITY_AGGREGATIONS.

Return values

bool