Hello,
I would like to contribute some code to be included in the next release of Drupal. It adds search to aggregator.module
You can see it at work here: http://www.phillyfuture.org/search?keys=wifi
I believe this is a very important feature that should be part of Drupal's default aggregator.module. If you take a look at my example, it shows you just how poweful such a search can be - since it is limited by RSS feeds that are flowing thru my aggregator - it provides high quality results that are relevent to the mission of my site.
The feature was simple to add. I just added an implementation of hook_search():
/**
* Implementation of hook_search().
*/
function aggregator_search($keys) {
$find = array();
// Replace wildcards with MySQL/PostgreSQL wildcards.
$keys = str_replace('*', '%', $keys);
$words = explode(",", $keys);
foreach ($words as $word) {
$word = trim($word);
$title_filter[] = "lower(i.title) LIKE '%" . $word . "%'";
$feed_filter[] = "lower(f.title) LIKE '%" . $word . "%'";
$content_filter[] = "lower(i.description) LIKE '%" . $word . "%'";
}
$filter_query = implode(" OR ", $feed_filter) . ' OR ' .implode(" OR ", $title_filter) . ' OR ' . implode(" OR ", $content_filter);
$result = db_query_range("
SELECT i.*, f.link AS feed_link, f.title AS feed_title, f.url AS feed_rss
FROM {aggregator_item} i