I am writing a windows service that uses the Laserfiche RA SDK. This service will kick off a process every night. The process executes a search and does some processing against the documents returned in the search results.
It feels like there might be some value in setting the Refresh property to true since the search will be executed numerous times but the SDK documentation does not do a good explain of explaining the value of setting it to true or when it should be set to true.
When should the Refresh property be set to true?
What is the effect of setting it to true?
What is the difference between running a search with the property set to true vs. false?
Here is my search code in case this might help understand what I am trying to do...
// A while statement here that returns true until someone stops the Windows service. while (service has not been stopped) { SearchListingSettings settings = new SearchListingSettings(); settings.AddColumn(SystemColumn.Id); // Do I set this to true or false if I am running this code multiple times? settings.Refresh = true; using (var search = new Search(session)) { search.FuzzyType = FuzzyType.None; search.Command = "My search command" search.Run(); using (var listing = search.GetResultListing(settings)) { foreach (var row in listing) { var id = row.GetValue<int>(SystemColumn.Id); // Process document here } } } // A wait statement here (inside the while loop) that waits until 1:00am every day. }