diff --git a/code/DMSDocument.php b/code/DMSDocument.php index 35e3e32..c09f091 100755 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -944,5 +944,18 @@ class DMSDocument_Controller extends Controller { return $linkText; } + /** + * Get Content For FullTextSearch module (using Solr) */ + function getContent() { + if (class_exists('FileTextExtractor')) { + // Determine which extractor can process this file. + $extractor = FileTextExtractor::for_file($this->owner->FullPath); + if (!$extractor) return null; + + $text = $extractor->getContent($this->owner->FullPath); + return $text; + } + } + }