mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
add field record_type
This commit is contained in:
parent
0686cfecf5
commit
2310395e46
|
@ -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()));
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user