Help getting started

103 views
Skip to first unread message

achar...@gmail.com

unread,
Apr 29, 2016, 10:37:49 AM4/29/16
to Case Commons Development
1. I installed the gem
2. Created pg_search_scope and everything works.

I feel like I am missing the "indexing" step.

Do I have to index my user table and the name and email columns against which I am running my searches or does it happen automatically?

My pg_search_scope
pg_search_scope :search_by_name_or_email,
                    :against => {
                      :name => 'A',
                      :email => 'B'
                    },
                    :using => {
                      :tsearch => {:prefix => true}
                    }



Thanks.

Grant Hutchins

unread,
May 5, 2016, 7:00:43 PM5/5/16
to casecom...@googlegroups.com
You don’t need to index. You will always get the latest results based on the current state of the table.

You can opt to add an index if you want to improve performance, though. It’s a bit complicated. You can read some advice on the pg_search GitHub wiki.

Grant Hutchins

--

---
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.

Reply all
Reply to author
Forward
0 new messages