-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically generate indexes #2
Comments
It would be nice to have some guidance, such as a wiki page, describing how to manually setup the indexes until it's automated. |
Agreed. I will get a wiki page up soon. |
+1 |
1 similar comment
+1 |
Here's an index for the multisearch table which works with the configuration:
Basically everything inside the gin(...) is what is generated by pg_search, so this should go into the multi-search table and can be auto generated once the user decides how multi-search is to be globally used. The only problem (which cannot really be auto-solved) is if the user changes configuration, they also need to change the index.
|
Thanks, @dlikhten, that looks like a reasonable index for that configuration. You should ensure that your important queries actually use the index by looking through output from For now, we have a wiki page that can help guide people to design their indexes. https://github.com/Casecommons/pg_search/wiki/Building-indexes |
* Fix the spec `where rank > 0.7` by different logic
We should have a rake task that generates indexes where possible.
For dynamic scopes it will be difficult to generate indexes. Perhaps there can be some sort of way to call into a dynamic scope with the options you use for a typical search and have it generate an index instead of results.
The text was updated successfully, but these errors were encountered: