Tweak autocomplete query a bit
This commit is contained in:
@@ -52,7 +52,11 @@ class BrowserHistory
|
||||
let dataContext = persistentContainer.viewContext
|
||||
|
||||
let fetchRequest: NSFetchRequest<HistoryItemEntity> = HistoryItemEntity.fetchRequest()
|
||||
fetchRequest.predicate = NSPredicate(format: "host CONTAINS %@ OR title contains %@", matching, matching)
|
||||
fetchRequest.predicate = NSPredicate(format: """
|
||||
host CONTAINS[cd] %@
|
||||
OR title CONTAINS[cd] %@
|
||||
OR url ENDSWITH[cd] %@
|
||||
""", matching, matching, matching)
|
||||
fetchRequest.fetchLimit = 200
|
||||
fetchRequest.sortDescriptors = [ NSSortDescriptor(key: "visitCount", ascending: false) ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user