Commit c81b0c1cc1a3e16345197429069f597be3ef9196
1 parent
16d3d433
KTS-2904
"Indexing process must not remove item from indexing queue if there is a problem with text extraction process" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7999 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
3 deletions
search2/indexing/indexerCore.inc.php
| @@ -1034,6 +1034,7 @@ abstract class Indexer | @@ -1034,6 +1034,7 @@ abstract class Indexer | ||
| 1034 | 1034 | ||
| 1035 | $this->executeHook($extractor, 'pre_extract'); | 1035 | $this->executeHook($extractor, 'pre_extract'); |
| 1036 | $this->executeHook($extractor, 'pre_extract', $mimeType); | 1036 | $this->executeHook($extractor, 'pre_extract', $mimeType); |
| 1037 | + $removeFromQueue = false; | ||
| 1037 | 1038 | ||
| 1038 | if ($extractor->extractTextContent()) | 1039 | if ($extractor->extractTextContent()) |
| 1039 | { | 1040 | { |
| @@ -1048,11 +1049,10 @@ abstract class Indexer | @@ -1048,11 +1049,10 @@ abstract class Indexer | ||
| 1048 | if ($indexDiscussion) | 1049 | if ($indexDiscussion) |
| 1049 | { | 1050 | { |
| 1050 | $indexStatus = $this->indexDocumentAndDiscussion($docId, $targetFile, $title, $version); | 1051 | $indexStatus = $this->indexDocumentAndDiscussion($docId, $targetFile, $title, $version); |
| 1051 | - | 1052 | + $removeFromQueue = $indexStatus; |
| 1052 | if (!$indexStatus) | 1053 | if (!$indexStatus) |
| 1053 | { | 1054 | { |
| 1054 | $this->logPendingDocumentInfoStatus($docId, sprintf(_kt("Problem indexing document %d - indexDocumentAndDiscussion"),$docId), 'error'); | 1055 | $this->logPendingDocumentInfoStatus($docId, sprintf(_kt("Problem indexing document %d - indexDocumentAndDiscussion"),$docId), 'error'); |
| 1055 | - | ||
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | $extractor->setIndexingStatus($indexStatus); | 1058 | $extractor->setIndexingStatus($indexStatus); |
| @@ -1066,6 +1066,7 @@ abstract class Indexer | @@ -1066,6 +1066,7 @@ abstract class Indexer | ||
| 1066 | else | 1066 | else |
| 1067 | { | 1067 | { |
| 1068 | $indexStatus = $this->indexDocument($docId, $targetFile, $title, $version); | 1068 | $indexStatus = $this->indexDocument($docId, $targetFile, $title, $version); |
| 1069 | + $removeFromQueue = $indexStatus; | ||
| 1069 | 1070 | ||
| 1070 | if (!$indexStatus) | 1071 | if (!$indexStatus) |
| 1071 | { | 1072 | { |
| @@ -1095,7 +1096,7 @@ abstract class Indexer | @@ -1095,7 +1096,7 @@ abstract class Indexer | ||
| 1095 | } | 1096 | } |
| 1096 | 1097 | ||
| 1097 | @unlink($targetFile); | 1098 | @unlink($targetFile); |
| 1098 | - $removeFromQueue = $indexStatus; | 1099 | + |
| 1099 | } | 1100 | } |
| 1100 | else | 1101 | else |
| 1101 | { | 1102 | { |