From f2d9616a427026c42ef47d0c5b3e5d42611544ac Mon Sep 17 00:00:00 2001 From: Megan Watson Date: Thu, 14 May 2009 14:17:54 +0200 Subject: [PATCH] KTC-754 The filter now returns true if there's no content and logs it, no content doesn't mean there's an error. "If document is empty indexing returns error" Fixed. --- search2/indexing/indexerCore.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/search2/indexing/indexerCore.inc.php b/search2/indexing/indexerCore.inc.php index 7e1efaf..fb4eb5c 100755 --- a/search2/indexing/indexerCore.inc.php +++ b/search2/indexing/indexerCore.inc.php @@ -759,9 +759,11 @@ abstract class Indexer { $content = file_get_contents($filename); - // if the file is empty something went wrong with the text extraction + // if the file is empty skip the filter - document was probably empty if(empty($content)){ - return false; + global $default; + $default->log->debug('No text was extracted from the document. Either it was empty or there was a problem with the extraction'); + return true; } $src = array("([\r\n])","([\n][\n])","([\n])","([\t])",'([ ][ ])'); -- libgit2 0.21.4