pg_search icon indicating copy to clipboard operation
pg_search copied to clipboard

Support for augmenting with websearch_to_tsquery()

Open krainboltgreene opened this issue 4 years ago • 5 comments

As seen here: https://www.postgresql.org/docs/11/functions-textsearch.html

I would assume this happens at the call level:

class Post < ApplicationRecord
	pg_search_scope :search_by_title, against: :title
end
Post.search_by_title("word|word")
Post.search_by_title.websearch("word or word")

krainboltgreene avatar Mar 02 '20 18:03 krainboltgreene

I released a library based on pg_search supporting websearch queries. If your search usecase is simple enough, it might be a possible option.

wyozi avatar Mar 22 '20 13:03 wyozi

I'm interested in this functionality as well. I'll like to get feedback from the core maintainers: how much work do you think would adding this feature require? I would like to get a sense of if I could dig in and contribute it, or if it's more of a massive effort. I have no prior knowledge of the pg_search codebase.

lwouis avatar Nov 12 '20 02:11 lwouis

+1 on this, though I'd add that I'd find it most useful if I could do a multisearch that uses Postgres' websearch.

tomcardoso avatar Dec 18 '20 08:12 tomcardoso

+1 on this ... is there a chance you could use something similar to Elixir ecto's fragments for it?

nacengineer avatar Dec 02 '21 16:12 nacengineer

It would be great to have this feature.

linjunpop avatar Jun 14 '23 10:06 linjunpop