CodeExplorer getTotalValue example
$id =
$hit['_id'
];
$data[$id] =
[ 'primaryKey' =>
$id,
'data' =>
array_merge( $hit['_source'
] ??
[],
['id' =>
$id, '_score' =>
$hit['_score'
]] ),
];
} $total =
$this->
getTotalValue($criteria,
$result);
if ($criteria->
useIdSorting()) { $data =
$this->
sortByIdArray($criteria->
getIds(),
$data);
} return new IdSearchResult($total,
$data,
$criteria,
$context);
} private function extractHits(array
$result): array
{ $records =
[];