Meilisearch PHP | Documentation

SimilarDocumentsSearchResult
in package
implements Countable, IteratorAggregate

FinalYes
Tags
implements

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  : int|non-empty-string
$limit  : int
$offset  : int
$performanceDetails  : array<string, string>|null
$processingTimeMs  : int
$raw  : array<string, mixed>

Methods

__construct()  : mixed
count()  : int
getEstimatedTotalHits()  : int
getHit()  : array<string, mixed>|TDefault
getHits()  : array<int, array<string, mixed>>
getHitsCount()  : int
getId()  : int|non-empty-string
getIterator()  : ArrayIterator
getLimit()  : int
getOffset()  : int
getPerformanceDetails()  : array<string, string>|null
getProcessingTimeMs()  : int
getRaw()  : array<string, mixed>
toArray()  : array<string|int, 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[, TDefault $default = null ]) : array<string, mixed>|TDefault
Parameters
$key : int
$default : TDefault = null
Tags
template
Return values
array<string, mixed>|TDefault

getPerformanceDetails()

public getPerformanceDetails() : array<string, string>|null
Return values
array<string, string>|null

toArray()

Converts the SimilarDocumentsSearchResult to an array representation.

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

        
On this page

Search results