Singleton that runs searches and display results
Members
-
(static) abortedSearchAttempts :Number
-
The number of times the search had to be aborted because another search operation was still loading
Type:
- Number
-
(static) commonFolderUrl :String
-
The URL to the folder where search engine scripts (eg. SearchUnit.js) are kept (no trailing slash required)
Type:
- String
-
(static) customDictionaryPath :String
-
Path to a custom dictionary, this is relative to the indexDirectory\Dictionaries\ folder (ie specify a filename here and put a text file with that name in the Dictionaries folder under the index directory)
Type:
- String
-
(static) highlightKeywordsInResultDocument :Boolean
-
Whether to highlight exact keyword matches in the result document, works with HTML based documents that have imported the SearchUnit_Highlighter.js script.
Type:
- Boolean
-
(static) indexDirectory :String
-
The index directory to search
Type:
- String
-
(static) keywordHighlightPattern :String
-
HTML to use to highlight keyword highlights, default is <span class='sew_resultHighlight'>{0}</span>
Type:
- String
-
(static) language :String
-
The language of the text that is being searched, this affects spell checking: Danish, Dutch, English, EnglishAustralia, EnglishCanada, EnglishMedical, EnglishUK, EnglishUS, French, German, Italian, Norwegian, Polish, Portuguese, Spanish, SpanishLatinAmerica, Swedish, Russian, Custom.
Type:
- String
-
(static) pageNumber :Number
-
The current result page number
Type:
- Number
-
(static) query :String
-
The current search query, may be null
Type:
- String
-
(static) queryKeywords :Array
-
String array of individual keywords in the query
Type:
- Array
-
(static) resultKeywordParameterName :String
-
The query string parameter name to use when linking to results, this is for the highlighter functionality (default=searchunitkeywords).
Type:
- String
-
(static) resultsPerPage :Number
-
Number of results to show per page
Type:
- Number
-
(static) securityGroups :Array
-
Array of encrypted security group names that the user can search with-in, see the Help topic on Security Groups for information
Type:
- Array
-
(static) serviceProxy
-
Handles AJAX service calls
-
(static) spellingSuggestionSource :String
-
Where the spelling suggestions will be sourced, options are defined in the Keyoti.SearchEngine.Suggestions.SpellingSuggestionSource enum (eg. FromEventOnly, PresetDictionary, SearchLexicon, PresetDictionaryAndOptionalSearchLexicon, PresetDictionaryAndSearchLexicon). Care should be taken with lexicon based options as large lexicons can cause slow downs.
Type:
- String
-
(static) updateOnOptionChange :Boolean
-
Whether to update search results as soon as any search options (categories, filters, sort-by) are changed, if this is false it is necessary to call keyotiSearch.showPage(1, true) to trigger a refresh
Type:
- Boolean
-
(static) useWCFService :Boolean
-
Whether to use WCF to communicate with the server, this is only usable if the application is running under .NET 4+ on the server
Type:
- Boolean
Methods
-
(static) _doSearch()
-
-
(static) _getQueryStringParameters()
-
-
(static) _onDocumentReady()
-
-
(static) _parseQueryStringParameters()
-
-
(static) createCustomDataSortControl()
-
Creates the Custom Data sort control
-
(static) getFooterJSON()
-
Gets an object containing footer information, so that it can be used with a template
-
(static) getHeaderJSON()
-
Gets an object containing header information, so that it can be used with a template
-
(static) getPagingLinksBlock()
-
Gets a block of HTML with links to result pages
-
(static) getSecurityGroups()
-
Returns the security groups set by the developer
-
(static) highlightResultItems()
-
Adds highlight tags around keyword hits
-
(static) highlightText()
-
Adds a highlight to text and returns it, the highlight is set in keyotiSearch.keywordHighlightPattern if the highlightPattern argument is not set.
-
(static) htmlEscape()
-
Escapes HTML entities
-
(static) load()
-
Load the controls with data from 'jsonObject'
-
(static) makeQueryStringForSearchParameters()
-
Returns the query string based on search parameters
-
(static) nextPage()
-
Shows the next page of results
-
(static) onCategoryControlsCreated()
-
Empty function, called when category controls are created, intended to be overridden by user code.
-
(static) onContentChange()
-
Called when the chosen content categories changes
-
(static) onFilterChange()
-
Called when a filter changes
-
(static) onLocationChange()
-
Called when the chosen location category changes
-
(static) onSortChange()
-
Called when the sort order changes
-
(static) presentResults()
-
Shows the search results from keyotiSearch.resultObject
-
(static) previousPage()
-
Shows the previous page of results
-
(static) search(query, pageNumber, _blockPushStateToHistory)
-
Runs the search and shows the results
Parameters:
Name Type Description query
The search query pageNumber
The result page to show _blockPushStateToHistory
Whether to prevent this search being logged in the browser's history -
(static) showPage(pageNumber, blockScroll)
-
Shows a result page specified by 'pageNumber'
Parameters:
Name Type Description pageNumber
The page to show blockScroll
Whether to prevent the page scrolling back to the top as the new page of results is shown -
(static) updateSearchCloud()
-
Calls the server to obtain search cloud terms, and displays them using createChildControls function