From d709f10c07acda6adb0f49e0f73de535703f3bb6 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 5 May 2026 12:16:59 -0500 Subject: [PATCH] Rename search no-match SQL helper Co-Authored-By: Paperclip --- server/src/services/company-search.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/services/company-search.ts b/server/src/services/company-search.ts index d7297786afd..a8af1ccc6cb 100644 --- a/server/src/services/company-search.ts +++ b/server/src/services/company-search.ts @@ -95,7 +95,7 @@ function tokenMatchExpression(textExpression: SQL, tokenArray: SQL) { `; } -function positiveSql() { +function noMatchSql() { return sql`false`; } @@ -409,10 +409,10 @@ export function companySearchService(db: Db) { FROM unnest(${fuzzyTokenArray}) AS qt(value) ), false) ` - : positiveSql(); + : noMatchSql(); const fuzzyIdentifierMatch = fuzzyEnabled ? sql`similarity(lower(coalesce(${issues.identifier}, '')), ${normalizedQuery}) >= ${FUZZY_IDENTIFIER_SIMILARITY_THRESHOLD}` - : positiveSql(); + : noMatchSql(); const fuzzyMatch = sql`(${fuzzyTokenTitleMatch} OR ${fuzzyIdentifierMatch})`; const tokenCoverage = sql` ( @@ -446,7 +446,7 @@ export function companySearchService(db: Db) { const tokenCount = tokens.length; const allTokensMatch = tokenCount > 0 ? sql`${tokenCoverage} = ${tokenCount}` - : positiveSql(); + : noMatchSql(); const score = sql` ( CASE WHEN lower(coalesce(${issues.identifier}, '')) = ${normalizedQuery} THEN 1200 ELSE 0 END