[questions][fix] remove threshhold

pull/478/head
hpkoh 3 years ago
parent e6f3b76269
commit abcfb2f7aa

@ -219,8 +219,8 @@ export const questionsQuestionRouter = createRouter()
SELECT id FROM "QuestionsQuestion"
WHERE
to_tsvector("content") @@ to_tsquery('english', ${query})
AND ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 32) > 0.6
ORDER BY ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 32) DESC;
ORDER BY ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 4) DESC
LIMIT 3;
`;
const relatedQuestionsIdArray = relatedQuestionsId.map(
@ -299,8 +299,8 @@ export const questionsQuestionRouter = createRouter()
SELECT id FROM "QuestionsQuestion"
WHERE
to_tsvector("content") @@ to_tsquery('english', ${query})
AND ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 32) > 0.8
ORDER BY ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 32) DESC;
ORDER BY ts_rank_cd(to_tsvector("content"), to_tsquery('english', ${query}), 4) DESC
LIMIT 3;
`;
}

Loading…
Cancel
Save