Close
dtSearch Text Retrieval Engine Programmer's Reference
dtsSearchResultsItem Structure

Properties of a single retrieved document from a search.

File: dtsearch.h

Syntax
C++
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; long fieldFlags; int textFlags; };

There are two ways to obtain a dtsSearchResultsItem: 

(1) Call dtsSearchResults.getDocInfo(), or (2) In a search callback function during a search.

Search callbacks

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.