Full text search on substring in PostgreSQL -


i trying retrieve data database using to_tsquery() on basis of text search. able results complete word search not substring.

example:

select * snp_gene_context protein_name @@ to_tsquery('english','kin') , gene_dist='0'; 

i able rows containing word 'kin11' unable rows containing 'kinase'.

full text search doesn't work on substrings — words.

for indexed substring searches you'd need use pg_trgm extension. there's good article faster like/ilike searches using pg_trgm on select * depesz blog. there's trade-of though — slower writes.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -