/** * Index an entry by id. * * @action index * @param string $id * @param bool $shouldUpdate * @return int entry int id */ function indexAction($id, $shouldUpdate = true) { if (kEntitlementUtils::getEntitlementEnforcement()) { throw new KalturaAPIException(KalturaErrors::CANNOT_INDEX_OBJECT_WHEN_ENTITLEMENT_IS_ENABLE); } $entryDb = entryPeer::retrieveByPK($id); if (!$entryDb) { throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $id); } if (!$shouldUpdate) { $entryDb->indexToSearchIndex(); return $entryDb->getIntId(); } return myEntryUtils::index($entryDb); }