-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: index tweaks and exclude blank description from search #277
Conversation
Code lgtm, but one nagging doubt I have is the effect of deploying this to the database during a period of high search usage. It's generally considered bad practice to create indexes on deployment, but the performance impact is probably acceptable give that it takes only ~1s. Maybe @LoneRifle can advise as well. |
You really really should be letting sequelize handle this for you: |
Will check if this is possible for the search index |
What's the intention actually? Do you wish to keep the index schema fresher than what |
It was initially done with a sql migration script as sequelize doesn't have support for postgres full text search so I didn't think it would be possible to use sequelize's sync for a text search index but that might not be the case |
Changed to use sequelize to manage index. Migration script has to be run to drop the previously manually managed index on production before deployment |
Problem
Links with no description should be excluded from search as some links should not be discoverable.
Solution
Add a condition to search to exclude urls with blank descriptions
Improvements:
config.ts
or env varsDeploy notes: