Skip to content

Instantly share code, notes, and snippets.

@ninetwentyfour
Created April 8, 2012 18:58
Show Gist options
  • Save ninetwentyfour/2339198 to your computer and use it in GitHub Desktop.
Save ninetwentyfour/2339198 to your computer and use it in GitHub Desktop.
IndexTank To IndexDen
<?php
function add_to_index() {
$projects = $this->Project->find('all');
foreach($projects as $project){
$indexData = array('text'=>$project['Project']['title'],'title'=>$project['Project']['title'],'description'=>$project['Project']['description'],'user_id'=>$project['Project']['user_id']);
$id = $project['Project']['_id'];
$this->addIndextank("HomkoraProjects",$id,$indexData);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment