I am not able to get meaningful search results (which I would expect to work) using PHP XML-RPC. I am following the syntax as shown in the following, but alas, I am not getting anything useful back:
https://www.dokuwiki.org/search
Here are the relevant code snippets:
XMLRPC client
public function search($query)
{
// initialize the new message for the search method call
$message = new xmlrpcmsg('dokuwiki.search');
$message->addParam(new xmlrpcval($query, "string"));
// return message results based on XMLRPC server response
return $this->getResults( $this->_client->send($message) );
}
Code that makes use of the above XMLRPC client:
private function searchWiki($pattern, $namespace)
{
try {
$query = "$pattern @$namespace";
echo "$query\n";
return $this->_dokuwiki->search($query);
} catch (Exception $e) {
return $e->getMessage() . "\n";
}
}
Here is example output after making calls to "searchWiki":
activity @detailed-manuals:swft
object(xmlrpcval)#6 (3) {
["me"]=>
array(1) {
["array"]=>
array(0) {
}
}
["mytype"]=>
int(2)
["_php_class"]=>
NULL
}
FTP @detailed-manuals:ftp-clients
object(xmlrpcval)#6 (3) {
["me"]=>
array(1) {
["array"]=>
array(0) {
}
}
["mytype"]=>
int(2)
["_php_class"]=>
NULL
}
I know that those queries SHOULD return some results based on the content in these pages, so I must be doing something wrong. However ... trying "[$pattern @$namespace]" doesn't work either. What gives?