SearchEngineDelegate
public protocol SearchEngineDelegate : AnyObject
Declares the list of methods for receiving result of search and resolve operations
-
Search Engine calls this method for every search update
Declaration
Swift
func suggestionsUpdated(suggestions: [SearchSuggestion], searchEngine: SearchEngine)
Parameters
searchEngine
calling engine
searchEngine
calling engine
-
offlineResultsUpdated(_:suggestions:searchEngine:)
Default implementationSearch Engine calls this method for every offline search update
Default Implementation
Default implementation does nothing
Declaration
Swift
func offlineResultsUpdated(_ results: [SearchResult], suggestions: [SearchSuggestion], searchEngine: SearchEngine)
Parameters
results
resolved search results
suggestions
suggestions for search results
searchEngine
calling engine
-
Search Engine did resolve SearchSuggestion. To receive resolved Search result you have to call “select(suggestion: SearchSuggestion)” method
Declaration
Swift
func resultResolved(result: SearchResult, searchEngine: SearchEngine)
Parameters
result
resolved search result
searchEngine
calling engine
-
resultsResolved(results:searchEngine:)
Default implementationOptional. Search Engine did resolve SearchSuggestion’s.
Default Implementation
Default implementation does nothing
Declaration
Swift
func resultsResolved(results: [SearchResult], searchEngine: SearchEngine)
Parameters
results
resolved search result
searchEngine
calling engine
-
Report search error during engine interaction
Declaration
Swift
func searchErrorHappened(searchError: SearchError, searchEngine: SearchEngine)
Parameters
searchError
search error
searchEngine
calling engine