Tags down


how to do OR to all the words in full text search instead of AND in postgres

By : solata123_ 45
Date : October 17 2020, 01:08 AM
Hope that helps I have a post table which has a tsv column. Let's assume tsv is generated by title only. There are 3 rows in the post table now. Their titles are 'hello', 'world' and 'hello world'. , You should use the "or" operator in tsquery:
code :
... WHERE tsv @@ to_tsquery('hello | world');

Share : facebook icon twitter icon

Make postgres full text search (tsvector) act like ILIKE to search inside words?

By : user2879493
Date : March 29 2020, 07:55 AM
around this issue Are you aware of trigram search, provided by the additional module pg_trgm? That seems more appropriate for your use case than text search.
With a trigram index in place (GIN or GiST) you can use your original ILIKE predicate and get index support for it. You need Postgres 9.1+ for that.

Postgres full text search: how to search multiple words in multiple fields?

By : user3753766
Date : March 29 2020, 07:55 AM
Does that help It looks like what you want is, in fact to search the concatenation of all those fields.
You could build a query doing exactly this
code :
... where to_tsvector('italian', name||' '||coalesce(decription,'')...) @@ to_tsquery('$word')
create index your_index on shop
using GIN(to_tsvector('italian',name||' '||coalesce(decription,'')...))

Postgres full-text search performance for common words

By : amir0ir
Date : March 29 2020, 07:55 AM
I wish this helpful for you I created a new table and saved the concatenated tsvector in a column and index that, it seems to have improved the speed.

Matching only some words in a Postgres full text search

By : geet saraf
Date : March 29 2020, 07:55 AM

Postgres full text search and spelling mistakes (aka fuzzy full text search)

By : user3607356
Date : March 29 2020, 07:55 AM
With these it helps I have a scenario, where I have data for informal communications that I need to be able to search. Therefore I want full text search, but I also to make sense of spelling mistakes. Question is how do I take spelling mistakes into account in order to be able to do fuzzy full text search??
code :
SELECT to_tsquery('balloon |' ||
                  string_agg(word, ' | ')
FROM data_words
WHERE similarity(word, 'balloon') > 0.4;
Privacy Policy - Terms - Contact Us © soohba.com