I followed the instructions @ Drupal: how to access to Drupal's APIs with a standalone php script? , however, my search query is returning 0 results (an empty array). I have confirmed that the same search term returns a result if executed from my drupal web page.
<?php
chdir("drupal");
define("DRUPAL_ROOT",".");
require_once './includes/bootstrap.inc';
include 'drupal/modules/search/search.api.php';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$keys = array("harry","potter");
$result = hook_search_execute($keys);
print_r($result);
?>
Can anyone give me some pointers as to why this isn't working? Many thanks!