By subir_ghosh on
I am using the search config module which I want to change a bit to make the search results ordered by creation date rather than modified date.
The relevant portion in the module file seems to be this:
function search_config_update_index() {
// This hook is only called when the search module is enabled
// The function_exists check can be removed, but there is no harm in leaving it in
if (function_exists('search_wipe')) {
$types = node_get_types('names');
$remove = variable_get('search_config_disable_index_type', array());
foreach ($remove as $type => $value) {
if (isset($types[$type]) && $value === $type) {
$result = db_query("SELECT n.nid FROM {node} n INNER JOIN {search_dataset} s ON n.nid=s.sid WHERE n.type = '%s'", $type);
while ($data = db_fetch_object($result)) {
search_wipe($data->nid, 'node');
}
}
}
}
}
I can't seem to make the $result appear differently ORDER by created
Comments
Since that's an appearance
Since that's an appearance type thing I'm guessing it's being overridden by a theme function somewhere-- instead of fooling with the SQL you should check out theming search results instead. Maybe this thread http://drupal.org/node/33650 can provide some tips. It's about something different, but it shows one way to theme search results.