database - PostgreSQL Full Text Search, short query -




i have table here called suggestions store many search terms suggest user in autocomplete feature.

i'm using postgresql full text search problem need query work 3 chars. example, if user wanna search iphone 6, when type iph iphone suggestions must appear. query works when user types iphone.

and happens words... biggest word more user needs type.

this query i'm using:

select a.word   public.auto_complete  to_tsvector(a.word) @@ to_tsquery('iph')  order a.word  limit 5 

how can fix this?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -