Customize search using CludoJS options

When implementing search on a website, the CludoJS can be used to enable/disable and customize certain features. These settings should be implemented in the CludoSettings script, where the options are defined as an object with multiple parameters.

Option reference (Overlay and Legacy Inline)

The table below lists each option with a precise description, default value, and—where the same behaviour exists in the Rich Inline Template—the equivalent path in window.cludoConfig. For the Rich Inline Template, use cludoConfig and the nested structure described in the Rich Inline Template documentation; option names and nesting differ from Overlay and Legacy.

OptionOverlayLegacy InlineDefaultDescriptionRich Inline Template equivalentExample
allowSearchWithoutSearchwordfalseWhen true, loading the search results page with no query runs a wildcard search and shows results. When false, no search runs until the user enters a query.behavior.allowSearchWithoutSearchwordallowSearchWithoutSearchword: true
autocompleteMinimumQueryLength1Minimum number of characters the user must type before autocomplete suggestions appear.autocomplete.minimumQueryLength (RIT default: 3)autocompleteMinimumQueryLength: 3
customCallbackAfterSearchFunction called after search results have been received and rendered. Use for custom analytics or DOM updates.callbacks.afterSearchcustomCallbackAfterSearch: function(data){ console.log(data); }
customNoResultsMessageText or HTML shown when a search returns no results (replaces the default “no results” message).overrideStrings (e.g. template_nrm_*)customNoResultsMessage: "No results found."
disableAutocompletefalseWhen true, the autocomplete dropdown is disabled; no suggestions appear as the user types.autocomplete.disabledisableAutocomplete: true
filtersPre-applied filters that restrict which results are returned. Key = filter type (e.g. DomainName, PageType), value = array of allowed values.facets.defaultValues (and engine filters in MyCludo)filters: {"DomainName": ["https://www.example.com"]}
sortOrderSort results by a crawler field and direction. Key = field name, value = “asc” or “desc”. If not set, results are sorted by relevance.sort.defaultOrdersortOrder: {"Date_date": "desc"}
focusOnResultsAfterSearchfalseWhen true, after the user submits a search, focus moves to the search results area (improves keyboard and screen-reader UX).behavior.focusOnResultsAfterSearchfocusOnResultsAfterSearch: true
hideResultsCountfalseWhen true, the line showing the number of results (e.g. “X results”) is hidden.overrideStrings or themehideResultsCount: true
hideSearchDidYouMeanfalseWhen true, the “Did you mean …?” suggestion line is hidden.hideSearchDidYouMean: true
hideSearchFiltersfalseWhen true, the facets/filters panel (e.g. categories) is hidden.hideSearchFilters: true
hideSearchFiltersIfNoResulttrueWhen true, the facets panel is hidden when the search returns no results.hideSearchFiltersIfNoResult: false
initFacetsFacet values applied by default to every search (e.g. restrict to a category). Key = facet type, value = array of values.facets.defaultValuesinitFacets: {"Category": ["Documents"]}
initSearchBoxText“”Placeholder or hint text shown in the search input when it is empty (e.g. on blur or before typing).initSearchBoxText: "Search..."
jumpToTopOnFacetClicktrueWhen true, clicking a facet/filter scrolls the page or result list to the top so the user sees the updated results.behavior.jumpToTopOnFacetClickjumpToTopOnFacetClick: false
languagee.g. “en”Search language (ISO code). Affects query processing, autocomplete, and result language. Must match a supported language.language (top-level)language: 'en'
loadingHTML or text shown while a search is in progress (e.g. spinner or “Searching…”).behavior.loadingElementloading: "<span>Loading...</span>"

The table below describes each available option, what it does, and examples of values.