Well, it looks like you have a situation where the searched area is huge, but the number of searches is small (ie: however many times words they search for.)
My first thought would be to create a table with every combination you think is a valid pairing (can't think of any easy way to populate that table though...). So you could do synonyms, or common misspellings(cta/cat).
Anyway, then you take the search they entered and create an array. Let's say they search for "black house cat". You could explode() that with " " as separator.
$my_array = explode(" ", $_GET['keywords']);
Then run a foreach on the array to create query the database and create the larger word list. Something like:
unset( $new_keywords );
foreach($my_array AS $value)
{
$result = mysql_query("SELECT word_b FROM synonyms WHERE word_a='$value'");
while( $row = mysql_fetch_array($result) )
{
$new_keywords[]=$row[0];
}
$result = mysql_query("SELECT word_a FROM synonyms WHERE word_b='$value'");
while( $row = mysql_fetch_array($result) )
{
$new_keywords[]=$row[0];
}
}
note that I use 2 queries. That gives you the occurence regardless of which side of the table you find the word on.
ie: if they search for "cat", then the table only has to look like:
cat|felis
pet|cat
instead of looking like:
cat|felis
felis|cat
pet|cat
cat|pet