Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dtsearchretrieve(3) [hpux man page]

DtSearchRetrieve(library call)											    DtSearchRetrieve(library call)

NAME
DtSearchRetrieve -- Return clear text of documents from DtSearch databases SYNOPSIS
#include <Dt/Search.h> int DtSearchRetrieve( char *dbname, DB_ADDR dba, char **cleartext, long *clearlen, int *fzkeyi); DESCRIPTION
DtSearchRetrieve retrieves the uncompressed document text of a specified DtSearch document listed in the DtSrResult list from a previous call to DtSearchQuery. It will be successful only in an AusText type database where the documents are stored directly in a database reposi- tory. ARGUMENTS
dbname Specifies which database the document is stored in. It can be any one of the database name strings returned from DtSearchInit or DtSearchReinit. If dbname is NULL, the first database name string is used. dba The database address of the desired record from the DtSrResult.dba field in a search results list. cleartext Specifies a pointer where a zero terminated C string containing the document text will be stored. The string is allocated storage that will be freed by the next call to this function. clearlen Specifies a pointer where the length of the cleartext string will be stored. fzkeyi This is a reserved argument. It should always be NULL. RETURN VALUE
DtSearchRetrieve returns DtSrOK as well as the cleartext string, when document retrieval is completely successful. It returns DtSrNOTAVAIL if the document text is not available from the database for whatever reason. Any other return code signifies failure and user messages on the MessageList explain why. Any API function can also return DtSrREINIT and the return codes for fatal engine errors at any time. SEE ALSO
dtsrcreate(1), DtSrAPI(3), DtSearchQuery(3), DtSearch(5) DtSearchRetrieve(library call)

Check Out this Related Man Page

DtSearchHighlight(library call) 										   DtSearchHighlight(library call)

NAME
DtSearchHighlight -- Generate DtSrHitwords table for highlighting DtSearch document SYNOPSIS
#include <Dt/Search.h> intDtSearchHighlight( char *dbname, char *cleartext, DtSrHitword **hitwptr, long *hitwcount, int search_type, char *stems, int stemcount); DESCRIPTION
The DtSearchHighlight function generates an array of offsets and lengths (DtSrHitword) of parsed linguistic terms (stems) in the passed document cleartext to enable a browser to highlight the words in the text as appropriate for its user interface. ARGUMENTS
dbname Specifies which database is to be searched. It is any one of the database name strings returned from DtSearchInit or DtSearchReinit. If dbname is NULL, the first database name string is used. cleartext Pointer to a zero terminated C string containing the document text to be highlighted. Usually, but not necessarily, this value is returned from DtSearchRetrieve. hitwptr and hitwcount The hitwords array will be stored in hitwptr, the address of a DtSrHitword pointer. The array is dynamically allocated by this function and remains valid until the next call to this function. The size of the hitwords array will be stored in hitwcount. search_type Specifies the search_type of the DtSearchQuery that generated the stems array. It must be zero, 'P', 'W', or 'S'. If zero is passed, the search_type of the last call to DtSearchQuery is assumed. stems and stemcount stems and stemcount are optional; they can be NULL and zero respectively. However, if either is specified, both must be speci- fied. If specified, they refer to the stems array that was returned from the previous call to DtSearchQuery that ultimately resulted in the cleartext argument. If these arguments are not passed, the stems array from the most recent call to DtSearchQuery is assumed. RETURN VALUE
This function returns DtSrOK, as well as a DtSrHitword table, when the table generation is completely successful. Any other return code signifies failure and user messages on the MessageList explain why. Any API function can also return DtSrREINIT and the return codes for fatal engine errors at any time. SEE ALSO
DtSrAPI(3), DtSearchQuery(3), DtSearchRetrieve(3) DtSearchHighlight(library call)
Man Page