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 15caa33 commit 0f8d6f1Copy full SHA for 0f8d6f1
1 file changed
src/logic/search/Search.swift
@@ -1,6 +1,8 @@
1
import Foundation
2
3
final class Search {
4
+ private static let minSimilarity = 0.4
5
+
6
static func normalizedQuery(_ query: String) -> String {
7
normalizeForSpaceInsensitiveSearch(query).text
8
}
@@ -9,7 +11,7 @@ final class Search {
9
11
let normalized = normalizedQuery(query)
10
12
if normalized.isEmpty { return true }
13
ensureCache(for: window, normalizedQuery: normalized)
- return !window.swAppResults.isEmpty || !window.swTitleResults.isEmpty
14
+ return window.swBestSimilarity >= minSimilarity
15
16
17
static func relevance(for window: Window, query: String) -> Double {
0 commit comments