You are here: dtSearch.Engine > SearchReportJob Class
SearchReportJob Class
Close
dtSearch Engine API for .NET Framework 2.x-4.x
SearchReportJob Class

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

Syntax
C#
Visual Basic
public class SearchReportJob : DisposableObject;

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
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 %% 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.
dtSearch__Engine__SearchReportJobdtSearch__Engine__SearchReportJob
Copyright (c) 1998-2018 dtSearch Corp. All rights reserved.