Copied!

SearchResult

SearchResult.php : 23
Extends ValueObject
Implements IteratorAggregate, AggregationResultAwareInterface

This class represents a search result.

Properties

public $aggregations

SearchResult.php : 25
public AggregationResultCollection $aggregations

public $maxScore

SearchResult.php : 49

The maximum score of this query.

public float|null $maxScore = null

public $searchHits

SearchResult.php : 32

The value objects found for the query.

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

public $spellcheck

SearchResult.php : 34
public SpellcheckResult|null $spellcheck = null

public $time

SearchResult.php : 39

The duration of the search processing in ms.

public int $time = 0

public $timedOut

SearchResult.php : 44

Indicates if the search has timed out.

public bool|null $timedOut = null

public $totalCount

SearchResult.php : 58

The total number of searchHits.

public int|null $totalCount

null if Query->performCount was set to false and search engine avoids search lookup.

Methods

public__construct()

SearchResult.php : 60

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they aren't writable anymore after object has been created.

Parameters

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

publicgetAggregations()

SearchResult.php : 74
public getAggregations() : AggregationResultCollection|null

Return values

AggregationResultCollection|null

publicgetIterator()

SearchResult.php : 79
public getIterator() : Iterator

Return values

Iterator

publicgetSpellcheck()

SearchResult.php : 69
public getSpellcheck() : SpellcheckResult|null

Return values

SpellcheckResult|null

protectedgetProperties()

ValueObject.php : 53

Returns list of available properties' names.

protected getProperties([array<int, string> $dynamicProperties = [] ]) : array<int, string>

Override to add dynamic properties.

Parameters

Name Type Default value Description
$dynamicProperties array<int, string> []

Additional dynamic properties exposed on the object

Return values

array<int, string>

Attributes
#[Ignore]