Hit Document Component

The Hit Document Component (or HitDoc) handles all requests to retrieve documents from the XML Hit List (XHitList) Component. By handling all such requests, the component can also provide next and previous hit document functionality, which allows users to quickly move between documents returned from a search without going back to the search results page.

HitDoc usage requires that the XHitList style sheet create document links that refer to the HitDoc component instead of the Document component.

Request Parameters

All request parameters must be prefixed with the component name as registered in the Executive.ini file and an underscore. The HitDoc component is registered by default as hitdoc so the q parameter described below must be specified in a URL or a form input as hitdoc_q. Where the possible values for a parameter are an enumeration of strings, case is not important.

Name Possible Values Default Description
c goto | next | prev goto Command to execute. goto redirects to the document specified by the bookmark (bm) parameter. next redirects to the document following the last document retrieved with goto. prev redirects to the document preceding the last document retrieved with goto. Order is determined by the order that documents are returned by the search engine.
hit hit number in document 1 The hit number within the document is passed to the Document Component so the document will be opened at the specified hit location.
concept 1 | 0 0 If concept=1, then the query is a concept query (or a find similar query). Hit highlighting is disabled on concept queries.
q query string none The query parameter is passed to the Document Component to enable hit highlighting.
x simple | advanced | server | custom syntax simple The NXT server's native syntax is server. Other syntaxes are translated into server syntax by query components.
s sort string empty string The syntax for sort strings is defined by Site View. If simple query syntax is being used and the sort string is empty, the sort defaults to relevance-weight. Otherwise, an empty sort string is passed to the query component.
bm document bookmark none Bookmark for the document to retrieve. This value is output by the XHitList. Required if the c parameter is goto.
dt template file name none Document template to use.
pdfhlm search search

The #search PDF highlight method specifies a list of terms that should be highlighted. When the PDF document is loaded, a PDF viewer automatically opens the Search panel and performs a search for any of the terms specified in the #search term list. The first matching term is highlighted in the document.

pdftermlist result | client | merged result Controls the generation of the Adobe Reader #search Open Parameter.

result will generate the term list using the actual hit results found within the PDF document being requested. This is the recommended setting as it allows for highlighting of terms for synonym, stemming, and thesaurus searches.

client will use the terms specified by the user, i.e. input in the search form.

merged will merge actual hit results with hyphenated terms specified by the user.
pdfhyphen Any combination of:
expand | retain | remove
expand Controls how hyphenated terms are handled in the generation of the Adobe Reader #search Open Parameter. This parameter is only applied when pdftermlist=merged.

expand specifies to expand hyphenated terms into two words: "on-line" expands to "on line"

retain specifies to preserve hyphenated terms: "on-line" is preserved as "on-line"

remove specifies to remove hyphens from the terms: "on-line" becomes "online"

Example:

Searching for "on-line" with "pdfhyphen=retain;remove" will produce "#search=on-line online".

Sample Request

http://localhost/NXT/Gateway.dll?
f=hitdoc&
hitdoc_c=goto&
hitdoc_q=hello&
hitdoc_bm=093843920849393849&
hitdoc_dt=document-frameset.htm

Redirects to:

http://localhost/NXT/Gateway.dll/my/doc/with/hello/init.htm?
  f=templates&
  fn=document-frameset.htm&
  q=hello&
  x=simple

Where:

The Gateway.dll and path is generated.

The rest of the path is the document path from the QueryList navigate properties.

f=templates is hardcoded.

fn=parameter from the hitdoc_dt parameter.

Error Conditions

If a required request parameter is missing when the c parameter is goto, it is assumed to be a logic error (in the templates) and a message is returned to the browser window through the error interface provided by the Executive.

Other errors are reported with a user-customizable error template:

Template Condition
hitdoc-failed-noquery.htm If a required parameter is not stored in the session data when the c parameter is prev or next, it is assumed that either there is not an active query or the session has timed out.
hitdoc-failed-iterator-begin.htm If a prev request is made, but the iterator is at the beginning.
hitdoc-failed-iterator-end.htm If a next request is made, but the iterator is at the end.
hitdoc-failed-nohits.htm If a prev or next request is made and the query or query sytax has changed since the goto request, it is assumed that there has been an intervening xhitlist query that returned no hits.