I don't know what fields you are referring to, but here is a quick fix for "keywords" field. But I must mention, I did not fully test it and it might break something on your gallery, you also will need use semicolon instead of space to separate keywords:
some;keywords;keywords can;be with spaces
these modifications should not affect existing keywords
in includes/functions.php find:
$split_keywords = explode(" ", $image_row['image_keywords']);
replace it with:
$split_keywords = explode(";", $image_row['image_keywords']);
in includes/search_utils.php find:
$split_words = preg_split("/\s+/", $val);
Replace it with:
$split_words = explode(";", $val);
find:
foreach ($split_words as $word) {
if ($word == "") {
Replace it with:
foreach ($split_words as $word) {
$word = trim($word);
if ($word == "") {