We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 036776b commit f97d244Copy full SHA for f97d244
backend/api/src/get-profiles.ts
@@ -84,7 +84,9 @@ export const loadProfiles = async (props: profileQueryType) => {
84
const keywords = name ? name.split(",").map(q => q.trim()).filter(Boolean) : []
85
// console.debug('keywords:', keywords)
86
87
- // TODO: do this in SQL for better performance
+ // TODO: do this in SQL for better performance. Precompute compatibility scores:
88
+ // - Have a table compatibility_scores(user_id_1, user_id_2, score) that updates whenever answers from either user change.
89
+ // - Query this table directly with "ORDER BY score DESC LIMIT {limit}".
90
if (orderByParam === 'compatibility_score') {
91
if (!compatibleWithUserId) {
92
console.error('Incompatible with user ID')
0 commit comments