diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php index 1ee2d93c7..c8e76b26c 100644 --- a/SeedDMS_Lucene/Lucene/IndexedDocument.php +++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php @@ -145,6 +145,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document { if($document->isType('document')) { $this->addField(Zend_Search_Lucene_Field::Keyword('document_id', 'D'.$document->getID())); + $this->addField(Zend_Search_Lucene_Field::Keyword('record_type', 'document')); $version = $document->getLatestContent(); if($version) { $this->addField(Zend_Search_Lucene_Field::Keyword('mimetype', $version->getMimeType())); @@ -232,7 +233,9 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document { } } elseif($document->isType('folder')) { $this->addField(Zend_Search_Lucene_Field::Keyword('document_id', 'F'.$document->getID())); + $this->addField(Zend_Search_Lucene_Field::Keyword('record_type', 'folder')); $this->addField(Zend_Search_Lucene_Field::UnIndexed('created', $document->getDate())); + $this->addField(Zend_Search_Lucene_Field::UnIndexed('indexed', time())); } } /* }}} */