This shows you the differences between two versions of the page.
— |
developer_center:recipe_book:extensions_and_core:internal_search_engines [2014/07/26 17:22] (current) freaktechnik created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | //This Article is based on the official [[http://blog.getnightingale.com/2013/03/25/changes-to-search-engines/|blogpost]]// | ||
+ | Nightingale allows search engines to be handled by internal code instead of sending a request to a webserver. In order to catch the query to be handled with a sbSearchEngine, the component needs to be regeistered. | ||
+ | |||
+ | The service it needs to be registered at is named ngIInternalSearchEnginesService. | ||
+ | |||
+ | Note: The engine name "internal" is reserved for the library search. | ||
+ | ====== Example ====== | ||
+ | <code> | ||
+ | var internalSearchService = Cc["@getnightingale.com/Nightingale/internal-search-service;1"].getService(Ci.ngIInternalSearchEnginesService); | ||
+ | internalSearchService.registerInternalSearchEngine("Song Search","song-search-engine", true); | ||
+ | </code> | ||
+ | This registers the component with the contractID song-search-engine as handler for the engine named "Song Search" and has the liveSearch feature. |