NCache 4.4 - Online Documentation

Configuring Query Indexes

 
Indexes are used in query for efficiency.Indexes 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 as follows:
 
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 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 NCache.Sample.Data.Product /L ProductID$ProductName$Category$Supplier$UnitsAvailable
 
    addqueryindex.exe demoLocalCache /a C:\temp\Data.dll /c NCache.Sample.Data.Customer /L CustomerID$CompanyName
  • Hit ENTER key, it will add ProductID, ProductName, Category, Supplier and UnitsAvailable attributes from the class NCache.Sample.Data.Product and NCache.Sample.Data.Customer of Data.dll in query indexes for demoLocalCache.
 
See Also