Search Engine

Applies to HTML Viewer, IE Browser publications.

See navigation panels.

About the built-in search engine

Publications come with a built-in search engine that allows end users to search for specific words or expressions through your entire publication, and only in some seconds. When compiling your publication, HTML Executable parses all HTML pages and collects keywords from them. These keywords are then indexed and the result is stored in the publication's data. Since keywords are indexed, it only takes some seconds for a search query to be completed.

HTML Executable tells the number of pages and unique words that were found while indexing pages in the compilation log.

End users can access to the search panel by clicking on the "Search" button or by selecting "Navigate|Show Search". You can also use HEScript commands to integrate the search engine in your HTML pages: see StartFullSearch.

Configuring the search engine

Enabling the search engine can result in a larger publication file (it depends on the number of HTML pages you compile). If you therefore do not want to include a search engine in your publication, then turn the following option on: "Disable the search engine".

When a search is complete, the publication lists the results. Each result displays the page's title and URL on which end users can click to access to the page. If you prefer to keep your URLs secret, you can also hide the page URLs from the search results. In this case, a "(click)" URL will be displayed instead.

Some keywords may be automatically excluded from the index so they won't give any result if end users search for them. In addition to some common words, you may add your own sensitive keywords to the exclusion list. Just press Add and specify the keyword to add. On the contrary, you can remove keywords from the exclusion list by selecting them and clicking Remove. Keyword exclusion lists may be imported/exported from/to XML files using the XML button, so you can edit them manually using any XML editor.

Some keywords may be escaped; the search engine always takes account of them.

With HTML Executable 3.3, we introduced an improved search engine that better filters results better. If you prefer to stay with the previous one, enable "Do not use the improved search engine".

Finally if your compiled website uses frames, you may need to specify in which frame a page whose URL was clicked on should be displayed. Use the SearchFrameTarget property to indicate it. This only applies to IE browser publications however.

The search engine supports phrases containing logical operators like for major Web search engines: + (AND), - (NOT), OR and quotes.

Examples:

  • red apple will return pages that both contain red and apple.
  • "red apple" comes with pages that exactly contain the "red apple" expression.
  • red OR apple return pages with red, and pages with apple.
  • red -apple return pages that contain "red" but that also do not contain "apple".

When a page from a search result is opened, keywords that were searched for may be highlighted (sometimes it might not work because it depends on the complexity of the page). You can modify the text style for highlighted words: click here for further information.

Customizing the display of search results

It is possible to customize how search results are formatted: go to the Localization tab, and under Resource Strings, you can modify these three resource strings:

  • SSearchResHTMLTableStart: HTML tags that start the HTML table which will contain the search results.
  • SSearchResHTMLCellFormat: HTML tags that define a single table cell and its contents. The four %s parameters are required: do not remove them (enclose a parameter with a HTML comment <!-- --> if you do not want to make it visible). The 1st %s parameter is replaced by the result's index; the 2nd one by the page's title; the 3rd one by the URL that would display the page if clicked and finally the last one by either the filename of the page or the "click" word (see above). If you want to use the percent symbol (for example 3%), use it twice: 3%% (thus the formatting routine doesn't misunderstand it with a parameter like %s).
  • SSearchResHTMLTableEnd: HTML tags that end the HTML table.