Meilisearch PHP | Documentation

SimilarDocumentsSearchResult
in package
implements Countable, IteratorAggregate

Tags
implements

\IteratorAggregate<array<int, array<string, mixed>>>

Table of Contents

Interfaces

Countable
IteratorAggregate

Properties

$estimatedTotalHits  : int
`estimatedTotalHits` is the attributes returned by the Meilisearch server and its value will not be modified by the methods in this class.
$hits  : array<int, array<string, mixed>>
$hitsCount  : int
$id  : string
$limit  : int
$offset  : int
$processingTimeMs  : int

Methods

__construct()  : mixed
count()  : int
getEstimatedTotalHits()  : int
getHit()  : array<string, mixed>|null
getHits()  : array<int, array<string, mixed>>
getHitsCount()  : int
getId()  : string
getIterator()  : ArrayIterator
getLimit()  : int
getOffset()  : int
getProcessingTimeMs()  : int
toArray()  : array<string, mixed>
Converts the SimilarDocumentsSearchResult to an array representation.

Properties

$estimatedTotalHits

`estimatedTotalHits` is the attributes returned by the Meilisearch server and its value will not be modified by the methods in this class.

private int $estimatedTotalHits

Please, use hitsCount if you want to know the real size of the hits array at any time.

Methods

getHit()

public getHit(int $key) : array<string, mixed>|null
Parameters
$key : int
Return values
array<string, mixed>|null

toArray()

Converts the SimilarDocumentsSearchResult to an array representation.

public toArray() : array<string, mixed>
Return values
array<string, mixed>

        
On this page

Search results