CoolCMS API

EsSearchResult
in package

FinalYes

Result of an ES search.

With fromEs = false (ES off, outage, circuit breaker) the caller switches to the MySQL FulltextFilter fallback.

Table of Contents

Properties

$fromEs  : bool
$highlights  : array<string|int, mixed>
$ids  : array<string|int, mixed>
$totalCount  : int

Methods

__construct()  : mixed
unavailable()  : self

Properties

$highlights read-only

public array<string|int, mixed> $highlights = []

Methods

__construct()

public __construct(array<string|int, int> $ids, int $totalCount, bool $fromEs[, array<int, array<string, string>> $highlights = [] ]) : mixed
Parameters
$ids : array<string|int, int>

entity ids ordered by relevance

$totalCount : int
$fromEs : bool
$highlights : array<int, array<string, string>> = []

entity id mapped to field mapped to finished safe HTML (escaped text with <em>/</em> as the only allowed tags, see EsHighlighter::toSafeHtml()). A key is missing when the field has no match or the source does not support highlights; the caller then prints the original text.

unavailable()

public static unavailable() : self
Return values
self
On this page

Search results