Each time a document is retrieved, this function will be called.
virtual void OnFound(long totalFiles, long totalHits, const char * name, long hitsInFile, dtsSearchNotificationItem& item);
|
Parameters |
Description |
|
long totalFiles |
Total number of files found so far |
|
long totalHits |
Total number of hits found so far |
|
const char * name |
Name of the file retrieved |
|
long hitsInFile |
Number of hits in this file |
|
dtsSearchNotificationItem& item |
Document properties (these will be mostly empty of the dtsSearchDelayDocInfo SearchFlags flag was set. |
An application can call DSearchJob::VetoThisItem from the OnFound callback to prevent the item from being included in search results.
CMySearchJob : public DSearchJob { public: ... virtual void OnError(long errorCode, const char *msg) { // First call base class implementation DSearchJob::OnError(errorCode, msg); // Now show the message to the user CString csMsg = GetMyErrorForErrorCode(errorCode); ShowMessageToUser(csMsg); } virtual void OnFound(long totalFiles, long totalHits, const char *name, long hitsInFile, dtsSearchResultsItem& item) { // First call base class implementation DSearchJob::OnFound(totalFiles, totalHits, name, hitsInFile, item); // Now show the file to the user ShowFoundFileToUser(name); } };
|
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.
|