Close
dtSearch Text Retrieval Engine Programmer's Reference
ISearchReportJob Interface

File: dten600.idl 

Module: COM Interface 

Syntax
IDL
interface ISearchReportJob : IDispatch;

Use a SearchReportJob to generate a search report from some or all of the items listed in a SearchResults object.

To create a SearchReportJob,

  1. Call the SearchResults object's NewSearchReportJob method (see ISearchResults),
  2. Set up the properties of the SearchReportJob to reflect the format of the report you want to create, and
  3. Call the Execute method of the SearchReportJob to create the report.

For sample code, see frmMakeReport in the vbsearch sample application.

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 this block of context.

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

ISearchReportJob