Describes a search report to be prepared from some or all of the items in a DSearchResults set.
File: dtsfc.h
Namespace: dtSearch
Data Member |
Description |
---|---|
Text inserted after each hit (Inherited from DOutputBase) | |
Text inserted before each hit (Inherited from DOutputBase) | |
Text to appear after each block of context | |
Text to appear in front of each block of context. | |
Text to appear between blocks of context (after the ContextFooter) | |
For HTML output, a doctype declaration to go at the top of the output (Inherited from DOutputBase) | |
Text to appear after each file in the search report | |
Text to appear after each file in the search report | |
Text inserted at the end of the file (Inherited from DOutputBase) | |
Text inserted at the start of the file (Inherited from DOutputBase) | |
For HTML output, an HREF for a BASE tag to be inserted in the header. (Inherited from DOutputBase) | |
For HTML output, HTML tags to insert in the header (Inherited from DOutputBase) | |
Name of file to create, if the output is to be written to a file. (Inherited from DOutputBase) |
Method |
Description |
---|---|
Attach search results to the DSearchReportJob. Unlike SetResults, AttachResults provides the option not to make a copy of the search results | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. (Inherited from DJobBase) | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. (Inherited from DJobBase) | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes. (Inherited from DJobBase) | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes. (Inherited from DJobBase) | |
Clear all fields to default values (Inherited from DOutputBase) | |
Constructor for a DSearchReportJob with no associated search results list. | |
Constructor for a DSearchReportJob associated with a search results list | |
Called to execute a job. (Inherited from DJobBase) | |
Called to execute a job. (Inherited from DOutputBase) | |
Generate the report | |
Returns non-zero if the job failed (Inherited from DJobBase) | |
Format all errors that occurred during execution as a single string, with line breaks separating the errors (Inherited from DJobBase) | |
Returns the number of errors recorded during execution (Inherited from DJobBase) | |
Returns a dtsErrorInfo with any errors that occurred during execution (Inherited from DJobBase) | |
Get ReportFlags for this report | |
If output was to a string, returns a pointer to the output string (Inherited from DOutputBase) | |
Get the length of the output string (Inherited from DOutputBase) | |
Returns true if the job has been cancelled (Inherited from DJobBase) | |
Returns true if output was directed to a string (Inherited from DOutputBase) | |
Returns true if the job has started and is not yet done. (Inherited from DJobBase) | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. (Inherited from DJobBase) | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. (Inherited from DOutputBase) | |
Called while a job is executing if an error is encountered, with the error code and message. (Inherited from DJobBase) | |
(Inherited from DOutputBase) | |
Callback function to receive output as it is generated (Inherited from DOutputBase) | |
Callback function to update the progress of the conversion or search report (Inherited from DOutputBase) | |
Not used (Inherited from DJobBase) | |
Select all items in the SearchResults. | |
Select a range of items in the SearchResults | |
Set the amount of context around each hit as a number of paragraphs | |
Include the whole file for each item in search results | |
Set the number of words of context around each hit, and specify whether the exact number of words should be collected. If fExact is false, enough paragraphs will be collected around each hit to include at least the specified number of words. | |
! Internal use only | |
Set ReportFlags for this report | |
Number of blocks of context to include in the report for each document. | |
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 | |
Specifies the format of the converted text. Currently supported options are: it_HTML, it_RTF, it_Utf8 (Unicode text), and it_Ansi. (Inherited from DOutputBase) | |
Send output only to the virtual callback function, OnOutput (Inherited from DOutputBase) | |
Send output to a file (Inherited from DOutputBase) | |
Send output to a string buffer managed by the class, and set the maximum length of the output string. (Inherited from DOutputBase) | |
Attach search results to the DSearchReportJob, making a private internal copy of the search results. | |
SetTimeout() causes a job to cancel automatically after the specified number of seconds (Inherited from DJobBase) | |
Do not pump waiting windows messages during callbacks (Inherited from DJobBase) | |
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations. (Inherited from DJobBase) | |
Write an error message to the error handler object attached to this job (Inherited from DJobBase) |
Data Member |
Description |
---|---|
Text inserted after each hit (Inherited from DOutputBase) | |
Text inserted before each hit (Inherited from DOutputBase) | |
Text to appear after each block of context | |
Text to appear in front of each block of context. | |
Text to appear between blocks of context (after the ContextFooter) | |
For HTML output, a doctype declaration to go at the top of the output (Inherited from DOutputBase) | |
Text to appear after each file in the search report | |
Text to appear after each file in the search report | |
Text inserted at the end of the file (Inherited from DOutputBase) | |
Text inserted at the start of the file (Inherited from DOutputBase) | |
For HTML output, an HREF for a BASE tag to be inserted in the header. (Inherited from DOutputBase) | |
For HTML output, HTML tags to insert in the header (Inherited from DOutputBase) | |
Name of file to create, if the output is to be written to a file. (Inherited from DOutputBase) |
Method |
Description |
---|---|
Attach search results to the DSearchReportJob. Unlike SetResults, AttachResults provides the option not to make a copy of the search results | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. (Inherited from DJobBase) | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. (Inherited from DJobBase) | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes. (Inherited from DJobBase) | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes. (Inherited from DJobBase) | |
Clear all fields to default values (Inherited from DOutputBase) | |
Constructor for a DSearchReportJob with no associated search results list. | |
Constructor for a DSearchReportJob associated with a search results list | |
Called to execute a job. (Inherited from DJobBase) | |
Called to execute a job. (Inherited from DOutputBase) | |
Generate the report | |
Returns non-zero if the job failed (Inherited from DJobBase) | |
Format all errors that occurred during execution as a single string, with line breaks separating the errors (Inherited from DJobBase) | |
Returns the number of errors recorded during execution (Inherited from DJobBase) | |
Returns a dtsErrorInfo with any errors that occurred during execution (Inherited from DJobBase) | |
Get ReportFlags for this report | |
If output was to a string, returns a pointer to the output string (Inherited from DOutputBase) | |
Get the length of the output string (Inherited from DOutputBase) | |
Returns true if the job has been cancelled (Inherited from DJobBase) | |
Returns true if output was directed to a string (Inherited from DOutputBase) | |
Returns true if the job has started and is not yet done. (Inherited from DJobBase) | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. (Inherited from DJobBase) | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. (Inherited from DOutputBase) | |
Called while a job is executing if an error is encountered, with the error code and message. (Inherited from DJobBase) | |
(Inherited from DOutputBase) | |
Callback function to receive output as it is generated (Inherited from DOutputBase) | |
Callback function to update the progress of the conversion or search report (Inherited from DOutputBase) | |
Not used (Inherited from DJobBase) | |
Select all items in the SearchResults. | |
Select a range of items in the SearchResults | |
Set the amount of context around each hit as a number of paragraphs | |
Include the whole file for each item in search results | |
Set the number of words of context around each hit, and specify whether the exact number of words should be collected. If fExact is false, enough paragraphs will be collected around each hit to include at least the specified number of words. | |
! Internal use only | |
Set ReportFlags for this report | |
Number of blocks of context to include in the report for each document. | |
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 | |
Specifies the format of the converted text. Currently supported options are: it_HTML, it_RTF, it_Utf8 (Unicode text), and it_Ansi. (Inherited from DOutputBase) | |
Send output only to the virtual callback function, OnOutput (Inherited from DOutputBase) | |
Send output to a file (Inherited from DOutputBase) | |
Send output to a string buffer managed by the class, and set the maximum length of the output string. (Inherited from DOutputBase) | |
Attach search results to the DSearchReportJob, making a private internal copy of the search results. | |
SetTimeout() causes a job to cancel automatically after the specified number of seconds (Inherited from DJobBase) | |
Do not pump waiting windows messages during callbacks (Inherited from DJobBase) | |
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations. (Inherited from DJobBase) | |
Write an error message to the error handler object attached to this job (Inherited from DJobBase) |
To generate a search report,
(1) Start with a dtsSearchResults object representing the results of a search.
(2) Declare a DSearchReportJob, passing the dtsSearchResults to the constructor
(3) Select the items to include in the search report using the Select*() methods in DSearchReportJob
(4) Specify the amount of context to include using SetContextWords() or SetContextParagraphs()
(5) Set the output format for the report
(6) Call Execute() to generate the report
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:
The report as a whole is constructed as follows:
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. |