Setting the Search Behavior for Partial Word Match
When searching for content there are two options available - exact word searching and partial word searching.
- Exact word searching - only words matching the typed search string are displayed in the results. For example, the search string site will only return instances where the complete word is site, and will ignore instances of sitemap or website.
- Partial word searching - search results find any instances of the string as it was typed, and any instances where the string is a fragment of a word. For example, where the search string is site, any instances of site, sitemap, or website will be returned.
By default, the Web Help templates are set to enable exact word matching and display the check box for selecting partial word matching.
You can set the default search behavior in the index.htm file:
- Either show or hide the check box for partial word matching.
- Set the default search behavior to automatically select exact word searching or automatically select partial word searching. The default behavior is used whether or not the partial word matching check box is displayed or hidden. For example you can remove the check box and then set the search behavior so it automatically uses partial word searching.
To Show or Hide the Partial Match Check Box Option:
- Open the index.htm in Notepad and locate the configuration section.
- Locate the code for Show Match partial words with Search.
- To display the check box change the value to "true".
- To hide the check box change the value to "false".
<!-- Show Match partial words with Search -->
<input id="matchPartialWords" type="hidden" value="true" />
- Save the changes to the index.htm file.
To Set the Default Search Behavior:
- Open the index.htm and locate the configuration section.
- Locate the code for Set search results to match partial words by default.
- Change the value to true to automatically use partial word matching.
- Change the value to false to automatically use exact word matching.
<!-- Set search results to match partial words by default -->
<!-- Note: this setting will apply regardless whether the 'Match partial words' showing or not -->
<input id="matchPartialWordsInResult" type="hidden" value="false" />
- Save the changes to the index.htm file.
|