TsVector in postgres is returning uncertain results when used with single alphabets

120 Views Asked by At

I am trying to write a autosuggest API using tsVectors in postgres. When I am running the following query:

select to_tsvector('english', 'This is a test') @@  to_tsquery('tes:*');```

Postgres is returning true, which is expected. But when I am running the following one,

select to_tsvector('english', 'This is test') @@  to_tsquery('t:*');

Postgres is returning false, which is unexpected. Does tsQueries don't work when used with a single alphabet followed by an wildcard operator ? Is there a solution for this situation ?

0

There are 0 best solutions below