Hit Highlighting in Result Pages

HTML based documents (ASPX etc) clicked on from the result list will have the search keywords highlighted if either the SearchUnit.js or SearchUnit_Highlighter.js scripts are imported on the page.

Import the SearchUnit_Highlighter.js script only if SearchUnit.js is not being used, the SearchUnit_Highlighter.js script is smaller than SearchUnit.js.

<script src="Keyoti_SearchEngine_Web_Common/SearchUnit_Highlighter.js"></script>

Disable Highlighting

To disable highlighting, call keyotiSearch.highlightKeywordsInResultDocument = false;

Change Highlighting Style

Specify a rule for the class keyoti_highlight on the page or .css file.

    <style>
        .keyoti_highlight
        {
            background-color: red;
        }
    </style>