Commit 99579bbf6ed7459a3a342e08760249b817725f0b

Authored by conradverm
1 parent 7c5f0788

KTS-2786

"KTAPI must provide a mechanism for indexing text to be updated so that client applications can provide text when the server does not have an extractor"
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Jalaloedien Abrahams

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7833 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 9 additions and 0 deletions
ktapi/KTAPIDocument.inc.php
@@ -1114,6 +1114,7 @@ class KTAPI_Document extends KTAPI_FolderItem @@ -1114,6 +1114,7 @@ class KTAPI_Document extends KTAPI_FolderItem
1114 1114
1115 $documents = array(); 1115 $documents = array();
1116 $document_content = array(); 1116 $document_content = array();
  1117 + $indexContent = null;
1117 1118
1118 foreach($sysdata as $rec) 1119 foreach($sysdata as $rec)
1119 { 1120 {
@@ -1134,6 +1135,9 @@ class KTAPI_Document extends KTAPI_FolderItem @@ -1134,6 +1135,9 @@ class KTAPI_Document extends KTAPI_FolderItem
1134 } 1135 }
1135 switch($name) 1136 switch($name)
1136 { 1137 {
  1138 + case 'index_content':
  1139 + $indexContent = $value;
  1140 + break;
1137 case 'created_date': 1141 case 'created_date':
1138 $documents['created'] = $value; 1142 $documents['created'] = $value;
1139 break; 1143 break;
@@ -1243,6 +1247,11 @@ class KTAPI_Document extends KTAPI_FolderItem @@ -1243,6 +1247,11 @@ class KTAPI_Document extends KTAPI_FolderItem
1243 return $result; 1247 return $result;
1244 } 1248 }
1245 } 1249 }
  1250 + if (!is_null($indexContent))
  1251 + {
  1252 + $indexer = Indexer::get();
  1253 + $indexer->updateDocumentIndex($this->documentid, $indexContent);
  1254 + }
1246 } 1255 }
1247 1256
1248 function clearCache() 1257 function clearCache()