The search box control can provide an AJAX based autocomplete as the user types a query, by default (the suggestions are customizable).
Access to the autocomplete Javascript object, is through the 'keyotiSearchAutocomplete' namespace.
keyotiSearchAutocomplete.sew_enabled
Whether autocomplete is enabled.keyotiSearchAutocomplete.filterFilenames
Whether to filter out filenames from the suggestions.keyotiSearchAutocomplete.sew_failSilent
Whether to show warning messages about errors - advised to set to false for development.keyotiSearchAutocomplete.options.indexDirectory
(Optional) The index directory to pull autocomplete suggestions from.
keyotiSearchAutocomplete.options.sew_queryTextBoxID
The ID of the text box where autocomplete suggestions will be shown.
keyotiSearchAutocomplete.options.sew_searchButtonID
The ID of the search button.
keyotiSearchAutocomplete.options.sew_numberOfSuggestions
The maximum number of suggestions to show.
keyotiSearchAutocomplete.options.sew_runSearchOnSelect
Whether to run search when an autocomplete suggestion is selected.
keyotiSearchAutocomplete.options.sew_showNumberOfResults
Whether to show the estimated number of results for each suggestion.
keyotiSearchAutocomplete.options.sew_autoCompleteQueryLoadPlugin
Whether to load any plugin DLL (as specified by Configuration.ExternalEventHandler) - this allows customization of the auto complete suggestions.
keyotiSearchAutocomplete.options.sew_hideNoResulters
Hide suggestions with no (estimated) results.
IndexLexicon
Uses the lexicon from the index directory as set under AutoCompleteQueryIndexDirectory, for auto-complete suggestions.PopularSearches
Previous search terms are used to provide auto-complete suggestions in order of popularity. The algorithm uses an attenuating window to keep new queries important and prevent the popular-search list becoming too large over time.
Note: The AutoCompleteQueryIndexDirectory must still be set.
Note: To prevent inappropriate suggestions and/or hijacking of suggestions by certain users, only words which are in the index lexicon will be offered as suggestions.
Note: Offensive words should not be added to the stop list as those words could appear as a suggestion if another user searches for them.PopularSearchesAndLexicon (default)
A mix of the above where popular searches are favored, and if there are not enough suggestions from that source then additional suggestions are found from the lexicon.
The popular search auto-complete source must synchronize all servers in a farm in order to function accurately (otherwise different servers will offer different suggestions).
To do this, specify the IP (or server name) of every server in the farm in the web.config, using an appSetting named Keyoti-SearchEngine-ServerFarmSynchronizationIPs, its value should be a comma-delimited list. It is also necessary to specify an appSetting named Keyoti-SearchEngine-ServerFarmSynchronizationAppPath with a value indicating the relative URL of the app. Eg.
<appSettings> <add key="Keyoti-SearchEngine-ServerFarmSynchronizationIPs" value="10.0.0.1,10.0.0.2,10.0.0.3"/> <add key="Keyoti-SearchEngine-ServerFarmSynchronizationAppPath" value="/myapp/"/> </appSettings>
The web.config also needs to have a HttpHandler registered, please see the HTTP handler install section.
Doing so will allow servers to communicate with each other every 5 minutes with changes in search keyword data.