Close
dtSearch .NET Standard API 2026.01
SearchResults.AutoUpdateSearchItem Method

Automatically update hit offsets if this document was indexed by an earlier version of dtSearch or was changed since it was last indexed.

public bool AutoUpdateSearchItem( int iItem, string tempFilename );
Parameters
Description
iItem
The item to update in SearchResults
tempFilename
If the search results item's filename does not correspond to an actual file on disk, set tempFilename to the name of a temporary file containing the document.

true if the item was updated

The update will use the search criteria from the original search (as recorded in SearchResults) in an unindexed search of the document, so the document must be accessible as a file. If the search results item's filename does not correspond to an actual file on disk, set tempFilename to the name of a temporary file containing the document. When highlighting hits using FileConverter, you can also use the dtsConvertAutoUpdateSearch flag to have FileConverter handle this.