NCache 4.6 - Online Documentation

Configuring Query Indexes

Indexes are used in querying for efficiency, and are based on the type of a class. The user may further specify the attributes of the class on which indexes are required. Query Indexes can be configured in the following ways:
Using NCache Manager
  • Click on the cache name in Cache Explorer to open cache settings.
  • Go to the Query Indexes tab.
  • Click Add.
  • Select Query Indices wizard will open. Click Browse to browse for the required assembly. Select the assembly.
  • Assembles and all its classes will be listed in Selected Assemblies section.
  • Select the required classes by checking the check box and clicking Add Class button.
  • List of selected classes and its attributes will be listed in List of selected Classes section. Select the attributes you want to add indexes for and click OK.
  • Select Query Indexes wizard will close and selected classes along with their attributes will appear in Selected classes and their attributes section.
  • Right click the cache in Cache Explorer and select Apply Configuration option.
Using Command Line Tool
  • Open the command prompt.
  • Go to the NCache tools directory: cd %NCHOME%/bin/tools
  • Use addqueryindex.exe, provide the required information:
addqueryindex.exe demoLocalCache /a C:\temp\Data.dll /c Data.Product /L ProductID$ProductName$Category$UnitsAvailable
addqueryindex.exe demoLocalCache /a C:\temp\Data.dll /c Data.Customer /L CustomerID$CustomerName
  • Press ENTER, it will add ProductID, ProductName, Category, Supplier and UnitsAvailable attributes from the class Data.Product and Data.Customer of Data.dll in query indexes for demoLocalCache.
See Also