I need to query a varchar column using lexeme prefixes - a user enters "ov st", it gets converted to to_tsquery('simple', 'ov:*&st:*'), and "Stack Overflow" gets returned as a match. But I don't understand how to make this query use indexing. The normal gin tsvector index,
create index concurrently cname_index on chat_names using gin (to_tsvector('simple', cname))
is only utilized when searching for full words (without the ':*'), and the trigram index only works for full string without breaking it into lexemes. Can someone, please, suggest me a solution that will satisfy these needs?