Commit 84f60ac0845f4c28919bf1f59b53e1cf9fdaf022

Authored by Conrad Vermeulen
1 parent 2ff73064

KTS-673

"The search algorithm needs some work"
Updated. webservice search structures 

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7408 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 32 additions and 14 deletions
ktwebservice/webservice.php
@@ -195,16 +195,26 @@ class KTWebService @@ -195,16 +195,26 @@ class KTWebService
195 $this->__typedef["{urn:$this->namespace}kt_search_result_item"] = 195 $this->__typedef["{urn:$this->namespace}kt_search_result_item"] =
196 array( 196 array(
197 'document_id' => 'int', 197 'document_id' => 'int',
198 - 'title' => 'string',  
199 - 'rank' => 'float', 198 + 'relevance' => 'float',
200 'text' => 'string', 199 'text' => 'string',
201 - 'filesize' => 'int', 200 + 'title' => 'string',
202 'fullpath' => 'string', 201 'fullpath' => 'string',
  202 + 'filesize' => 'int',
203 'version' => 'string', 203 'version' => 'string',
204 'filename' => 'string', 204 'filename' => 'string',
205 - 'checked_out_user' => 'string',  
206 - 'is_available' => 'boolean',  
207 - 'workflow' => 'string' 205 + 'folder_id' => 'int',
  206 + 'workflow' => 'string',
  207 + 'workflow_state' => 'string',
  208 + 'mime_type' => 'string',
  209 + 'owner' => 'string',
  210 + 'created_by' => 'string',
  211 + 'created_date' => 'string',
  212 + 'modified_by' => 'string',
  213 + 'modified_date' => 'string',
  214 + 'checked_out_by' => 'string',
  215 + 'checked_out_date' => 'string',
  216 + 'is_immutable' => 'bool',
  217 + 'status' => 'string',
208 ); 218 );
209 219
210 $this->__typedef["{urn:$this->namespace}kt_search_results"] = 220 $this->__typedef["{urn:$this->namespace}kt_search_results"] =
@@ -3334,26 +3344,34 @@ class KTWebService @@ -3334,26 +3344,34 @@ class KTWebService
3334 $results = array(); 3344 $results = array();
3335 foreach($rs as $hit) 3345 foreach($rs as $hit)
3336 { 3346 {
3337 - if ($hit->IsLive)  
3338 - {  
3339 -  
3340 - $item = array( 3347 + $item = array(
3341 'document_id' => (int) $hit->DocumentID, 3348 'document_id' => (int) $hit->DocumentID,
3342 'title' => (string) $hit->Title, 3349 'title' => (string) $hit->Title,
3343 - 'rank' => (float) $hit->Rank, 3350 + 'relevance' => (float) $hit->Rank,
3344 'text' => (string) $noText?'':$hit->Text, 3351 'text' => (string) $noText?'':$hit->Text,
3345 'filesize' => (int) $hit->Filesize, 3352 'filesize' => (int) $hit->Filesize,
3346 'fullpath' => (string) $hit->FullPath, 3353 'fullpath' => (string) $hit->FullPath,
3347 'version' => (string) $hit->Version, 3354 'version' => (string) $hit->Version,
3348 'filename' => (string) $hit->Filename, 3355 'filename' => (string) $hit->Filename,
3349 - 'checked_out_user' => (string) $hit->CheckedOutUser, 3356 + 'checked_out_by' => (string) $hit->CheckedOutUser,
  3357 + 'checked_out_date' => (string) $hit->DateCheckedOut,
3350 'is_available' => (bool) $hit->IsAvailable, 3358 'is_available' => (bool) $hit->IsAvailable,
3351 - 'workflow' => (string) $hit->Workflow 3359 + 'workflow' => (string) $hit->Workflow,
  3360 + 'workflow_state' => (string) $hit->WorkflowState,
  3361 + 'folder_id' => (int) $hit->FolderId,
  3362 + 'mime_type' => (string) $hit->MimeType,
  3363 + 'modified_by' => (string) $hit->ModifiedBy,
  3364 + 'modified_date' => (string) $hit->DateModified,
  3365 + 'created_by' => (string) $hit->CreatedBy,
  3366 + 'created_date' => (string) $hit->DateCreated,
  3367 + 'owner' => (string) $hit->Owner,
  3368 + 'is_immutable'=> (bool) $hit->Immutable,
  3369 + 'status' => (string) $hit->Status
3352 ); 3370 );
3353 3371
3354 $item = new SOAP_Value('item',"{urn:$this->namespace}kt_search_result_item", $item); 3372 $item = new SOAP_Value('item',"{urn:$this->namespace}kt_search_result_item", $item);
3355 $results[] = $item; 3373 $results[] = $item;
3356 - } 3374 +
3357 } 3375 }
3358 3376
3359 $response['message'] = ''; 3377 $response['message'] = '';