4
I don't see a problem in /search.php?query=school&andor=AND&mids[]=53&submit=Search&action=results
If some images have no name, you should provide one.
Other option is to introduce the search words as caption, if caption is empty at the end of /modules/xcgal/include/search.inc.php eg.
if ($caption == '' ) $caption = $search_string;
$rowset[$key]['caption_text'] = $caption;
Nicer would be that the relevant variable where the search text was found is used.