Links
dtSearch Text Retrieval Engine Programmer's Reference
dtsSearchReportJob Structure
Data Members | Classes | Legend | Members | Methods | Send Feedback

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

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;
};
File

dtsearch.h

Remarks

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 
Date 
Modification date of the file when indexed 
Hits 
Number of hits in the file 
Title 
The first 80 characters of the file 

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%%

Data Members
dtsSearchReportJob Structure
Data Member 
Description 
Number of words or paragraphs of context to include surrounding each hit. If dtsReportByWordExact is used, exactly the requested number of words of context will be included. Otherwise, enough paragraphs of context will be included to provide at least the requested number of words. Contiguous or overlapping blocks of context will be merged into a single block. 
Text to appear after each block of context 
Text to appear in front of each block of context. 
Text to appear after the contextFooter, between two blocks of context 
Text to appear after each file in the search report 
Text to appear in front of each file in the search report. 
ReportFlags specifying how the report should be generated 
Number of blocks of context to include in the report. If zero, all hits in each document will be included. 
Number of words to scan in each document looking for blocks of context to include in the report. For example, if maxWordsToRead=5000, then the search report will only include hits that occur in the first 5000 words in each document. This setting can be used to generate faster (but not necessarily complete) reports by limiting the search report to hits near the beginning of each document. 
dtsOutputInfo that defines the format and destination of the report output. 
Handle to the search results to generate this report from. Use dtsSearchResults.getHandle() to get the handle from a search results object. 
Number of items in the selections array. 
Array of long integers identifying the items in search results to include. 
Group
Methods
dtsSearchReportJob Structure
Method 
Description 
copy 
Copy another dtsSearchReportJob (shallow copy) 
Legend
 
Data Member 
 
Method 
Links
You are here: C++ API > Classes > dtsSearchReportJob Structure
Copyright (c) 1995-2008 dtSearch Corp. All rights reserved.