/lib/behavior/templates/deleteLuceneIndex.php
https://github.com/matteosister/sfPropelLuceneableBehaviorPlugin · PHP · 16 lines · 9 code · 2 blank · 5 comment · 0 complexity · d68559ba8211447863905ff24808cd0f MD5 · raw file
- /**
- * delete lucene index for this class
- * @param zend lucene index $index
- * @return boolean
- */
- public function deleteLuceneIndex()
- {
- $index = sfLuceneableToolkit::getLuceneIndex(get_class($this));
- foreach ($index->find('pk:'.$this-><?php echo $method ?>) as $hit)
- {
- $index->delete($hit->id);
- }
- return true;
- }