Question

At the moment I am playing with possibilities of great pg_search gem and differences between scope search and multisearch.

pg_search_scope seems more elegant solution which I would like to use, but I am interested in performance since I don't see any indexes built for this (unlike mutlisearch), what can I expect should I index columns I use manually? Any toughs?

Thanks all

Was it helpful?

Solution

pg_search just generates the queries, so adding GIN or GIST indexes to your columns should help performance, but then based on the combinations of searches that you are doing, the exact indexes that you will need to add will vary. A discussion that might help is here - https://github.com/Casecommons/pg_search/issues/15

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top