How to know in which column the term was found

219 views
Skip to first unread message

neli...@gmail.com

unread,
Jan 13, 2017, 7:06:15 AM1/13/17
to Case Commons Development
Hello!
If I have the following scope:

pg_search_scope :search, :against => [:name, :post_cache, :current_status, :user_name]

Am I able to know in which columns the term was found?

Thanks.

Nelio Carneiro

Grant Hutchins

unread,
Jan 13, 2017, 10:24:02 AM1/13/17
to Case Commons Development
Not automatically. Also, if you have multiple words in your search query, then some of those words might be in one column while others might be in another column.

So you'd need to come up with your own solution to try to figure that out.

--

---
You received this message because you are subscribed to the Google Groups "Case Commons Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to casecommons-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Grant Hutchins
Principal Software Developer
Pivotal Labs, Austin
Reply all
Reply to author
Forward
0 new messages