Since you already have the filenames from the
database, you don't need glimpse for the file name
Instead you can just run a SQL query like:
select filename from files where filename like \ '%file%';
Which is equivalent to running glimpseindex on 'file'.
Works in mysql, not sure about Postgres.
'_' is also equivalent to '.' in glimpse for match any
character. It's not quite full regexp support, but
it's better than nothing, especially when glimpse is
not an option.