Converts files to HTML, RTF, or text, optionally marking hits with caller-supplied tags.
File
File: dtsearch.h
Syntax
C++
struct dtsFileConvertJob2 : public dtsJobBase {
struct dtsOutputInfo * output;
const char * inputFile;
struct dtsInputStream * inputSource;
long hitCount;
long * hits;
long flags;
const char * alphabetLocation;
long typeId;
long docId;
const char * indexRetrievedFrom;
long detectedTypeId;
long indexedBy;
const char * encodedSearchItem;
dtsExtractionOptions * extractionOptions;
const char * hitsByWord;
dtsIndexCacheHandle indexCacheHandle;
};
Data Members
Data Member |
Description |
---|---|
The location of the dtSearch alphabet file to use when highlighting hits. The alphabet file determines how dtSearch counts words, so it is important that the same alphabet file used to index or search a file also be used to highlight hits. For more information on how hit highlighting works, see Highlighting Hits in the online help. To ensure that the same alphabet used to index a file is used to highlight hits in that file, set the alphabetLocation to the folder where the index is located. The alphabet definition will be stored in this folder (in a... more | |
File type of input document detected by dtSearch file parsers. typeId vs. detectedTypeId: typeId is provided as input to the conversion, and allows the caller to specify which file parser to use with a document. detectedTypeId is returned from the engine and indicates which file parser matched the document. | |
Document id of this document in the index it was found in. | |
Encoded version of search request that found this document String generated by urlEncodeItem with dtsUrlEncodeAsSearch | |
Options for extraction of embedded images and attachments | |
ConvertFlags specifying how the conversion should be performed | |
Number of hits to be highlighted | |
Word offsets of the hits to be highlighted (usually from dtsSearchResultsItem.hits) | |
A null-delimited string set containing the data returned by a search when the dtsSearchWantHitsByWord and dtsSearchWantHitDetails search flags are set. This is only used when the flag dtsConvertMultiHighlight is set to use different highlighting strings for each search term. | |
Optional handle to a dtsIndexCache to use when repeatedly using dtsConvertGetFromCache, to avoid extra index open/close operations. | |
Path of the index this document was found in | |
The build number of dtSearch that was used to index this file. This is transferred from search results by SetInputItem. It is used to improve backward compatibility when there are changes in file parsers, to minimize mis-highlighting. | |
Name of the input file to highlight. | |
A dtsInputStream that will return the document to be converted. (If an inputSource is provided, the inputFile will be ignored.) | |
Specification for the output format and destination (file, memory buffer, or callback) | |
Type id of the file parser to use to convert this file. This can be used to specify, for example, that an HTML file should be processed as plain text. If the document was retrieved in a search, the typeId should be set to the typeId returned from the search results object in the dtsSearchResultsItem. This ensures that the same file parser used to index the document is also used to highlight hits. |
Group
Members
Data Members
Data Member |
Description |
---|---|
The location of the dtSearch alphabet file to use when highlighting hits. The alphabet file determines how dtSearch counts words, so it is important that the same alphabet file used to index or search a file also be used to highlight hits. For more information on how hit highlighting works, see Highlighting Hits in the online help. To ensure that the same alphabet used to index a file is used to highlight hits in that file, set the alphabetLocation to the folder where the index is located. The alphabet definition will be stored in this folder (in a... more | |
File type of input document detected by dtSearch file parsers. typeId vs. detectedTypeId: typeId is provided as input to the conversion, and allows the caller to specify which file parser to use with a document. detectedTypeId is returned from the engine and indicates which file parser matched the document. | |
Document id of this document in the index it was found in. | |
Encoded version of search request that found this document String generated by urlEncodeItem with dtsUrlEncodeAsSearch | |
Options for extraction of embedded images and attachments | |
ConvertFlags specifying how the conversion should be performed | |
Number of hits to be highlighted | |
Word offsets of the hits to be highlighted (usually from dtsSearchResultsItem.hits) | |
A null-delimited string set containing the data returned by a search when the dtsSearchWantHitsByWord and dtsSearchWantHitDetails search flags are set. This is only used when the flag dtsConvertMultiHighlight is set to use different highlighting strings for each search term. | |
Optional handle to a dtsIndexCache to use when repeatedly using dtsConvertGetFromCache, to avoid extra index open/close operations. | |
Path of the index this document was found in | |
The build number of dtSearch that was used to index this file. This is transferred from search results by SetInputItem. It is used to improve backward compatibility when there are changes in file parsers, to minimize mis-highlighting. | |
Name of the input file to highlight. | |
A dtsInputStream that will return the document to be converted. (If an inputSource is provided, the inputFile will be ignored.) | |
Specification for the output format and destination (file, memory buffer, or callback) | |
Type id of the file parser to use to convert this file. This can be used to specify, for example, that an HTML file should be processed as plain text. If the document was retrieved in a search, the typeId should be set to the typeId returned from the search results object in the dtsSearchResultsItem. This ensures that the same file parser used to index the document is also used to highlight hits. |
Methods
Method |
Description |
---|---|
Constructor |
Methods
Method |
Description |
---|---|
Constructor |
Remarks
dtsFileConvertJob provides an easy way to display retrieved files in a web browser, web browser control, or other viewer with hits highlighted. If an array of hit offsets is included, these hits will be highlighted using the beforeHit and afterHit markers in the output document. The header and footer markers will appear at the beginning and end of the output file. Output can go to a disk file (outputFile), a memory buffer (outputBuf) or a callback function (pOutputFn). Input can come from a disk file (inputFile) or from a dtsInputStream (inputSource).