In answer to a thread in general discussion, I shared code that enables search for the aggregator, but it's flawed in numerous ways:
With a version of 4.6 it was possible to add search to the aggregator by implementing a search hook in aggregator.module:
<?php
/*
* Implementation of hook_search().
*/
function aggregator_search($op = 'search', $keys = null) {
switch ($op) {
case 'name':
return t('Philadelphia Blogs');
case 'search':
$find = array();
// Replace wildcards with MySQL/PostgreSQL wildcards.
$keys = preg_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
LEFT JOIN {aggregator_feed} f
ON i.fid = f.fid
WHERE (". $filter_query . ")
ORDER BY timestamp DESC", 0, 200);
while ($posting = db_fetch_object($result)) {