Someone pointed out in this thread that the search module doesn’t work with Gypsy fields. Here is a dirty hack that will enable the module to properly search gypsy fields. Use at your own risk!
/system/modules/search/mod.search.php (as ships with EE 1.6.8)
Replace lines 481-506:
if ($query->num_rows > 0)
{
$fql = "SELECT field_id, field_name, field_search FROM exp_weblog_fields WHERE (";
foreach ($query->result as $row)
{
$fql .= " group_id = '".$row['field_group']."' OR";
}
$fql = substr($fql, 0, -2).')';
$query = $DB->query($fql);
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
if ($row['field_search'] == 'y')
{
$fields[] = $row['field_id'];
}
$this->fields[$row['field_name']] = array($row['field_id'], $row['field_search']);
}
}
}
With the following:
$field_groups = array();
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
$field_groups[] = $row['field_group'];
}
}
$fql = "SELECT field_id, field_name, field_search, group_id, field_is_gypsy, gypsy_weblogs FROM exp_weblog_fields";
$query = $DB->query($fql);
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
$gypsy_weblogs = array();
if ($row['field_is_gypsy'] == 'y')
{
$gypsy_weblogs = array_filter(explode(' ', $row['gypsy_weblogs']));
}
if ($row['field_search'] == 'y' && (in_array($row['group_id'], $field_groups) || array_intersect($blog_array, $gypsy_weblogs) ))
{
$fields[] = $row['field_id'];
}
$this->fields[$row['field_name']] = array($row['field_id'], $row['field_search']);
}
}