This group of functions in Figure 13 finds out which terms are to be highlighted. It then starts a browse session, opens a document, and gets match information in the form of a data stream that can be parsed by an application program that calls your browser.
The DesGetBrowseInfo function receives a search argument and a handle. It returns a pointer to the browse information needed by DesStartBrowseSession. Browse information includes a list of all the terms to be highlighted.
Another method of getting browse information is to specify the Browse option in the function DesGetSearchResultTable.
The input parameters are:
The handle for database connection
A handle
A search argument.
This function returns a pointer to browse information.
The DesStartBrowseSession function starts a browse session, establishing the environment needed for browsing a text document and highlighting its matches. It receives a pointer to browse information, either from DesGetBrowseInfo or from DesGetSearchResultTable, and returns a browse session handle for use by the other browse functions.
The input parameter is:
A pointer to browse information from DesGetBrowseInfo or DesGetSearchResultTable
A user ID
A password.
This function returns a browse session handle.
The DesOpenDocument function receives a browse session pointer, a handle, and an option DES_FAST or DES_EXTENDED indicating the type of linguistic processing to be used for highlighting found terms. See Stage 2: Extended matching. DES_FAST uses basic text analysis, without the use of a dictionary, to determine which terms are to be highlighted. DES_EXTENDED uses extended matching.
DesOpenDocument prepares the text document that corresponds to the handle to get the document text and highlighting information, and it returns a document handle that is used for iteratively calling DesGetMatches.
The input parameters are:
A browse session handle from DesStartBrowseSession
A text handle
A match option: DES_FAST or DES_EXTENDED.
This function returns a document handle which is used by DesGetMatches and DesCloseDocument.
The DesGetMatches function returns a pointer to highlighting information for the text document described by a document handle. The highlighting information is a data stream. It comprises the text context (at least one paragraph) and information for highlighting text in that context. The data stream is described in Data stream syntax. An application program can parse the data stream and process it using the user's own browser.
DesGetMatches returns only a portion of the data stream, indicating the length of the portion in the output structure.
A sequence of calls to DesGetMatches gets the entire text document content. When the end of the text document is reached, an indicator is returned.
The input parameters are:
A browse session handle
A document handle from DesOpenDocument.
This function returns a pointer to a structure containing the data stream portion and its length.
The DesCloseDocument function closes a text document opened by DesOpenDocument, and releases the storage allocated during the return of document text and highlighting information.
The input parameters are:
A browse session handle
A document handle from DesOpenDocument.
None.
The DesEndBrowseSession function ends a browse session started by DesStartBrowseSession, and releases the storage allocated for the browse session.
The input parameter is:
A browse session handle
None.
The DesFreeBrowseInfo function frees storage allocated for the browse information by DesGetBrowseInfo.
The input parameter is:
A pointer to the browse information.
None.