* - The number that have been processed so far.
* - The total number of that model to be processed.
*
- * @param callable(Entity, int, int)|null $progressCallback
+ * @param callable(Entity, int, int):void|null $progressCallback
*/
public function indexAllEntities(?callable $progressCallback = null)
{
if ($entity instanceof Page) {
$bodyTermsMap = $this->generateTermScoreMapFromHtml($entity->html);
} else {
- $bodyTermsMap = $this->generateTermScoreMapFromText($entity->description, $entity->searchFactor);
+ $bodyTermsMap = $this->generateTermScoreMapFromText($entity->description ?? '', $entity->searchFactor);
}
$mergedScoreMap = $this->mergeTermScoreMaps($nameTermsMap, $bodyTermsMap, $tagTermsMap);