Close
dtSearch Text Retrieval Engine Programmer's Reference
dtsSearchReportJob Structure

Describes a search report to be prepared from some or all of the items in a dtsSearchResults set.

File: dtsearch.h

Syntax
C++
struct dtsSearchReportJob : public dtsJobBase { dtsSearchResultsHandle results; dtsOutputInfo * output; long flags; long amountOfContext; const char * fileHeader; const char * contextHeader; long * selections; long selectCount; const char * fileFooter; long maxContextBlocks; long maxWordsToRead; const char * contextFooter; const char * contextSeparator; };

To generate a search report, call the makeReport() member of a dtsSearchResults object.

Format

A search report lists the hits found in one or more documents, with each hit surrounded by a specified amount of context. Each block of context starts with a contextHeader and ends with the contextFooter. Contiguous or overlapping blocks of context will be combined. The amount of context included in the report can be specified by words or by paragraphs. 

Each block of context is constructed as follows:

[ContextHeader] ...text... [BeforeHit] hit [AfterHit] ...text... [ContextFooter]

 

The report as a whole is constructed as follows:

[Header] [FileHeader] [ContextHeader] ...text... [BeforeHit] hit [AfterHit] ...text... [ContextFooter] [ContextHeader] ...text... [BeforeHit] hit [AfterHit] ...text... [ContextFooter] ... more blocks of context, if present [FileFooter] ... more files ... [Footer]

 

Use the following symbols to insert file information into the FileHeader and FileFooter:

Symbol
Meaning
Filename
The name of the file (without path information). For PDF and HTML files, this will be the Title.
Location
The location of the file
Fullname
The path and filename of the file.
Size
File size in bytes
SizeK
File size in kilobytes
Date
Modification date of the file when indexed
Hits
Number of hits in the file
Title
The first 80 characters of the file
The docId of the file
Type
The file type (Microsoft Word, PDF, HTML, etc.)
Ordinal
The 1-based ordinal of this item in the SearchResults from which it was generated
IndexRetrievedFrom
The index where the file was found

Use the following symbols to insert context information in the contextHeader, which appears in front of each block of context:

Symbol
Meaning
Page
Page number where the hit occurs
Paragraph
Paragraph number where the hit occurs (relative to the start of the page)
Word
Word offset of the block of context from the beginning of the file.
FirstHit
Word offset of the first hit in the block of context.

Use %% around each symbol, like this: %%FullName%%