Properties of a single retrieved document from a search.
struct dtsSearchResultsItem { const char * filename; const char * displayName; const char * title; struct dtsFileDate modified; long hitCount; long wordCount; long size; long score; const char * userFields; long docId; long iIndex; const char * hitsByWord; long typeId; const char * hitsByWord2; long * hits; const char * location; const char * shortName; long indexedBy; const char * indexRetrievedFrom; const char * synopsis; const char * hitDetails; long scorePercent; long originalHitCount; long phraseCount; struct dtsFileDate created; __int64 size64; };
dtsearch.h
There are two ways to obtain a dtsSearchResultsItem:
(1) Call dtsSearchResults.getDocInfo(), or (2) In a search callback function during a search.
The dtSearch Engine will pass a pointer to a dtsSearchResultsItem to the pReportCallBack function that you supply in a dtsSearchJob to receive detailed status information during a search. The pointer is passed in the pFoundItem member of the dtsSearchResultsItem, which is passed in the dtsMessage structure passed to in the ptrParam. (The paramA member is the number of hits in the retrieved document and the strParam member is the name of the retrieved document.)
If the dtsSearchDelayDocInfo SearchFlag was set, most of the data in the dtsSearchResultsItem will be blank in callbacks, because the document information record has not yet been retrieved. Only information generated by the search (document id, hit count, hitsByWord, etc.) will be present.
|
Data Member |
Description |
|
File created date | |
|
Either a blank string, or the name of the retrieved file in a form that is more suited to user display than the filename | |
|
A long integer that uniquely identifies this document in the index | |
|
Name of the retrieved file. | |
|
count of items in hits list (See phraseCount below for an alternative count.) | |
|
A null-delimited string set containing details on the hits generated by each word match in a search request. | |
|
Word offsets of the hits in the document | |
|
A null-delimited string set containing the number of times each word or phrase in a search request was found. | |
|
deprecated, use hitDetails | |
|
If more than one index was searched, this will identify the index that the document was retrieved from. | |
|
Build number of dtSearch Engine version that indexed this file | |
|
Path of the index this document was found in | |
|
Location of the document | |
|
The modification date of the document | |
|
after URL-encode/decode, hitCount might be less than originalHitCount | |
|
Number of phrases matching the search request. | |
|
The score for each document is either the hit count or the weighted score, if automatic or variable term weighting was used in the search. | |
|
The scorePercent for each document is the score expressed as a percentage, relative to the highest-scoring document in the search results list. | |
|
Filename of the document with path removed | |
|
Size of the document, in bytes, when it was indexed (superseded by size64) | |
|
Size of the document, in bytes, when it was indexed | |
|
Snippet of text showing hits in context, if a search report was generated from the search results containing this item, and if the dtsReportStoreInResults flag was set in the dtsSearchReportJob | |
|
Text from the beginning of the document | |
|
File type of the document when it was indexed (see dtsImportType for a list of type ids) | |
|
A null-delimited list of field names and field values containing each field in this document that was listed in the storedFields list in the dtsIndexJob used to index the document | |
|
Number of words in the document when it was indexed. |
|
Method |
Description |
|
Get user-friendly name to display for this file, taking into account whether the PDF and HTML titles should be used in place of filenames | |
|
Returns true if this document was cached in the index when the index was created. |
|
Data Member |
|
Method |
|
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.
|