I'm finally in the process of updating an integration to the .Net SDK, version 10.2. I've attempted to use Search.GetHitCount method a couple of times, but it keeps returning zero. I incorporated sample code from the SDK to check that the search completes before moving forward. If I remove the raFolSearch.GetHitCount > 0 line, the code proceeds without any issues.
raFolSearch = New Search(raLFSession)
raFolSearch.Command = "{LF:Name=""LFFolder"",TYPE=""F""}"
Dim longOp As LongOperation = raFolSearch.BeginRun(True)
While Not longOp.IsCompleted
Thread.Sleep(1000)
raFolSearch.UpdateStatus()
End While
If raFolSearch.GetHitCount > 0 Then.......
Am I using the method incorrectly?