private function insertSearchWord($strText, $intId) { foreach ($this->getWords($strText, self::SEARCH_WEIGHT) as $strWord => $intWeight) { $objSearchIndex = new SearchIndex(); $objSearchIndex->setElementId($intId); $objSearchIndex->setWord($strWord); $objSearchIndex->setCount($intWeight); $objSearchIndex->save(); } }