See Also
dtSearch Text Retrieval Engine -- .NET API (.NET 2.0-4.0) 7.70
SearchReportJob Class

Generates a report showing each hit in one or more documents, with a specified amount of context

dtSearch::Engine::DisposableObject
    dtSearch::Engine::SearchReportJob
C#
public class SearchReportJob : DisposableObject;
Visual Basic
Public Class SearchReportJob
Inherits DisposableObject
Remarks

To generate a search report, 

(1) Start with a SearchResults object representing the results of a search. 

(2) Call SearchJob.NewSearchReportJob to make a SearchReportJob 

(3) Select the items to include in the search report using the Select*() methods in SearchReportJob 

(4) Specify the amount of context to include using WordsOfContextExact, ParagraphsOfContext, or WordsOfContext 

(5) Set the output format for the report using ContextFooter, ContextHeader, etc. 

(6) Call Execute() to generate the report 

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]
            [ContextSeparator]
            [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 %% around each symbol, like this: %%FullName%% 

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. 
See Also
You are here: dtSearch::Engine Namespace > SearchReportJob Class
Copyright (c) 1998-2012 dtSearch Corp. All rights reserved.