Add-QueryIndex
Note
This feature is only available in NCache Enterprise Edition.
Add-QueryIndex
cmdlet enables the user to add query indexes for the objects to
be added in the cache. These Query Indexes can later be used by the user to
search for items in the cache.
Add-QueryIndex [-CacheName] –AssemblyPath –Attributes -Class [-NoLogo] [-Password] [-Port] [-Server] [-UserId]
These properties are explained in detail in the Properties section.
Examples
- This command adds query indexing for the attribute CustomerID and FirstName for a cache named demoCache.
Add-QueryIndex -CacheName demoCache -AssemblyPath C:\\Data.dll -Class
Data.Customer –Attributes CustomerID'$'FirstName
- This command adds query indexing for the attribute CustomerID and FirstName for a cache named demoCache on server node ’20.200.20.11’.
Add-QueryIndex demoCache -AssemblyPath C:\\Data.dll -Class Data.Customer
–Attributes CustomerID'$'FirstName –Server 20.200.20.11
Properties
Note: The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-AssemblyPath* |
<String> |
Specifies the path of the assembly which needs to be configured. | - |
-CacheName* |
<String> |
Specifies the name of the cache for which query indexing needs to be done. | - |
-Class* |
<String> |
Specifies the fully qualified class for query indexing. | - |
-Attributes* |
<String> |
Specifies the attributes for query indexing. If multiple attributes need to be indexed; they are separated by a ‘$’. | - |
-Server |
<String> |
Specifies the NCache server name where the NCache service is running. | - |
-Port |
<Integer> |
Specifies the server port where NCache server is listening; if the server channel is not using the default port. | 8250 |
-UserId (Enterprise edition only) |
<String> |
Specifies the User Id used to authorize a user if security is enabled on cache server. This User Id must be the same as the active directory user credentials. | - |
-Password (Enterprise edition only) |
<String> |
Specifies the password against the user Id; to authorize a user if security is enabled on cache server. This password must be the same as active directory password. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |