How to Postgres search with two search text parameter , pg-search + Search FIlter 1 + search filter 2 .
How to search in pg_Search output I want union of “filter 1” && “filter 1”
@output = PgSearch.multisearch("filter 1") + PgSearch.multisearch("filter 2")
I’m the author and maintainer of pg_search.
Search terms are joined by AND by default in PostgreSQL full text search. Thus, you could simply do this:
Assuming you have the query terms in string variables, it would look something like one of these:
Joining by OR is a lot more complicated. I don’t yet have an easy solution for it, although it should be possible.