Creating a Query in JScript
Note
Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.
The JSQuery.js script of the SQuery Sample executes a query that is embedded in the script. The query produces a parent, chaptered recordset (which represents a hierarchical rowset) that contains selected columns forming a child chapter. The JSQuery.js script is a translation of the VBScript.vbs script into the JScript language. For a discussion of the VBScript version, see Creating a Query in Visual Basic Scripting Edition.
The following list divides the sample script into segments and shows the structure of the complete script. The individual topic for each segment describes the details of the code for that segment.
- Declare Variables
- Create a Query Object
- Set Properties of the Query Object
- Create a Utility Object
- Add the Physical Path and All Subdirectories
- Output Query Properties
- Create a Parent Recordset Object for the Query
- Determine the Name of the GroupBy Column
- Read Through the Parent Recordset Object
- Close the Parent Recordset Object