Casecommons / pg_search

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
http://www.casebook.net
MIT License
1.35k stars 370 forks source link

Multi-search weighing #295

Open olivierlacan opened 8 years ago

olivierlacan commented 8 years ago

I'm sorry if this is a dupe but I can't find the issue I remember looking up (perhaps it was a commit) where this was discussed.

I believe there is not currently a way to weigh results in a multi-search, but I have a vague memory of a somewhat hacky way to get around that. Or is there? Is this a feature you consider adding at some point, or is it not feasible for some obvious reason that escapes me?

I simply need to weigh ModelA above results for ModelB. I could do this on the front-end but if there's any pagination involved, it would quickly become a headache.

I'd like to help bring this feature if we can agree this is a good idea.

umerfarooq commented 8 years ago

+1

heisters commented 8 years ago

You're probably thinking of #86. I posted a possible workaround there.

olivierlacan commented 8 years ago

Thanks @heisters. Since that issue is closed I wonder if @nertzy would consider this nowadays.

nertzy commented 8 years ago

Long-term, I've hoped to replace the single PgSearch::Document-based multisearch implementation with a generator that builds you a class that you can manage yourself. That would make it easier for developers to tweak how things work for themselves.