function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jim AndersonJim Anderson 

ranked search results in API

I'm trying to query the Solutions Object like you can in the SelfServicePortal to get a ranked result..does anyone know if that is possible through the api?
 
SuperfellSuperfell
You can't see the actual rank value, but the results are returned in rank order, when you use the search method.

Message Edited by SimonF on 06-07-2007 09:29 AM

Jim AndersonJim Anderson

Thanks Simon!

 

On the search function and you specify any criteria? So if I have

find {Password Reset} returning solution(id)

Can I somehow say " If isPublished = true" ?  I need to make sure I only get back results that are published to the selfservice portal.

SuperfellSuperfell
Right now you'd have to return the isPublished flag and do the filtering yourself. There are planned improvements for this, so that the filtering can be done server side.
Jim AndersonJim Anderson
Perfect..thanks for the info.
 
And I ask one more question...using the php toolkit do you know how to handel the search results?
 
 
This is the code I tried...but I cant figure out how to access the results? It doesnt seem to work like normal querys results.  I printed to screen the $Result so I know something is being return.
 
Thanks for your help!  I've been working on this for days now :>)
 
 
$mySforceConnection = new SforcePartnerClient();
$mySforceConnection->createConnection(SF_WSDL);
$loginResult = $mySforceConnection->login(SF_USER_NAME, SF_PASSWORD);
$strSearch = "find {Password Reset} returning solution(id)";
$Result = $mySforceConnection->search($strSearch);
 
 $records = $Result->records;
  foreach ($records as $record) {
   
     $sObject = new SObject($record);
  
 }