From 189f9620123594fe7469a0ad8a770c304d7fd311 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 30 Jun 2021 12:53:20 +0200 Subject: [PATCH] add new methods setCmd() and setContent() --- SeedDMS_Lucene/Lucene/IndexedDocument.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php index a0b1b8ae7..14bd3fd49 100644 --- a/SeedDMS_Lucene/Lucene/IndexedDocument.php +++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php @@ -220,8 +220,20 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document { return $this->mimetype; } /* }}} */ + public function setContent($data) { /* {{{ */ + $this->addField(Zend_Search_Lucene_Field::UnStored('content', $data, 'utf-8')); + } /* }}} */ + public function getCmd() { /* {{{ */ return $this->cmd; } /* }}} */ + + /* Use only for setting the command if e.g. an extension takes over the + * conversion to txt (like the office extension which uses the collabora + * conversion service). + */ + public function setCmd($cmd) { /* {{{ */ + $this->cmd = $cmd; + } /* }}} */ } ?>