private function indexWords(FullTextData $fullTextData, array $indexArray, array $wordIDArray, $placement = 0)
{
$contentId = $fullTextData->id;
$prevWordId = 0;
for ($i = 0; $i < count($indexArray); ++$i) {
$indexWord = $indexArray[$i]['Word'];
$contentFieldId = $indexArray[$i]['ContentClassAttributeID'];
$identifier = $indexArray[$i]['identifier'];
$integerValue = $indexArray[$i]['integer_value'];
$wordId = $wordIDArray[$indexWord];
if (isset($indexArray[$i + 1])) {
$nextIndexWord = $indexArray[$i + 1]['Word'];
$nextWordId = $wordIDArray[$nextIndexWord];
} else {
$nextWordId = 0;
}
$frequency = 0;
$this->searchIndex->addObjectWordLink($wordId, $contentId, $frequency, $placement, $nextWordId, $prevWordId, $fullTextData->contentTypeId, $contentFieldId, $fullTextData->published, $fullTextData->sectionId, $identifier, $integerValue);
$prevWordId = $wordId;
++$placement;
}
return $placement;
}