Initial commit
[moodle.git] / search / documents / document.php
1 <?php
2   
3   class SearchDocument extends Zend_Search_Lucene_Document {  
4     public function __construct($document_type, $cid, $uid, $gid) {
5       $this->addField(Zend_Search_Lucene_Field::Keyword('type', $document_type));
6       $this->addField(Zend_Search_Lucene_Field::Keyword('courseid', $cid));
7       $this->addField(Zend_Search_Lucene_Field::Keyword('userid', $uid));
8       $this->addField(Zend_Search_Lucene_Field::Keyword('groupid', $gid));      
9     } //constructor    
10   } //SearchDocument
11     
12 ?>