fuse.search(searchText, in: Keyword.searchables, completion: { results in
...
})
And I am getting this problem:
To take in account: Keyword.searchables is an array of string with near of 3000 items in it.
By the moment I solved it on this way:
for (index, item) in chunk.enumerated() {
if let result = self.search(pattern, in: item) {
if result.ranges.allSatisfy({ $0.upperBound > $0.lowerBound }) {
items.append((index, result.score, result.ranges))
}
}
}
I know that's not the best way, and functionality comes affected, but it's working for me now.
I am trying use asynchronous version on this way:
And I am getting this problem:
To take in account: Keyword.searchables is an array of string with near of 3000 items in it.
By the moment I solved it on this way:
I know that's not the best way, and functionality comes affected, but it's working for me now.
Thanks in advance.