Help > Web Development > Object Reference > Code Samples > ASP.NET > Executing a search
<a name="kanchor597"></a>Executing a search
Demonstrates executing a command based query against an index.

// 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 { // Sort the result list by relevance results.Sort(SortRelevance); // Truncate the result list to 1000 items results.Truncate(1000); // Save the result list to disk searchId = results.Save(); finally { System.Runtime.InteropServices.ReleaseComObject(results); }