Exemplo n.º 1
0
 /**
  * Add an item to the date index.
  * @param $recordId int
  * @param $fieldId int
  * @param $date string
  * @param $text string optional -- if set, index the text value as well
  * @param $flush boolean Whether or not to flush entries for an existing object
  */
 function updateDateIndex($recordId, $fieldId, $date, $text = null, $flush = true)
 {
     $searchDao =& DAORegistry::getDAO('SearchDAO');
     $position = 0;
     $objectId = $searchDao->insertObject($recordId, $fieldId, $position, $date, $flush);
     if (!empty($text)) {
         SearchIndex::indexObjectKeywords($objectId, $text, $position);
     }
 }