Demonstrates enumerating an ISYS result list.
// Fetch the ISYS engine from application scope
IISYSAsp isys = (IISYSAsp) Application["ISYS"];
// Open the required index
IISYSIndex index = (IISYSIndex) isys.OpenIndex(@"c:\index");
// Execute the search
IISYSResultList results = index.PerformFind("manager", 0);
try {
// Calculate ranges
int rangeFrom = from;
int rangeTo = Math.Min(from + count - 1, results.Length);
// Enumerate
for (int i = rangeFrom; i <= rangeTo; i++) {
IISYSDocument document = results.Item(i);
try {
// Do any required processing on document object
} finally {
System.Runtime.InteropServices.ReleaseComObject(document);
}
}
} finally {
System.Runtime.InteropServices.ReleaseComObject(results);
}
|