Ovviamente non potrai fargli capire il "tema" se non aggiungendo un campo categoria, ma quello che vuoi fare per il resto è semplice.
Prendi la chiave di ricerca, ad esempio "bottiglia" e la scomponi con substr() mettendo le varie sottochiavi in un array
Codice PHP:
$chiave = "bottiglia";
$chiavi = array();
for ($i=2; $i<strlen($chiave); $i++) {
$chiavi[] = substr($chiave,0,$i);
}
// $chiavi conterrà: bot, bott, botti, bottig, bottigl, bottigli, bottiglia
//Ora costruisci la parte WHERE della query
$where = "";
foreach($chiavi as $valore)
$where .= "campo LIKE '%" . $valore . "%' OR ";
$where = substr($where,0,strlen($where)-4); //rimuove l'ultimo OR che alla fine non serve
//infine la query
$query = "SELECT DISTINCT campo FROM tabella WHERE " . $where;
EDIT: mi ero dimenticato di farlo col LIKE.