index

List indexes created in the current or specified region. For details see Basic Querying.

List existing index:

 

gfsh:/Orders>index

1. pc62(7777)<v8>:32023/42847 (server1): 
Row  Name   Type         Expression    From
---  ----   ----         ----------    ----
1    func1  FUNCTIONAL   o.customerId  /Orders o
2    pk1    PRIMARY_KEY  Id            /Orders

2. pc62(7874)<v9>:46611/47759 (server2): 
Row  Name   Type         Expression    From
---  ----   ----         ----------    ----
1    func1  FUNCTIONAL   o.customerId  /Orders o
2    pk1    PRIMARY_KEY  Id            /Orders

Create new Primary & Functional index:


gfsh:/Customers>index -m pc62(7777)<v8>:32023/42847 -n custPK -e /Customers.Id -from /Customers -primary   
	
1. pc62(7777)<v8>:32023/42847 (server1): index created: custPK
	
elapsed (msec): 4
	
gfsh:/Customers>index -m pc62(7777)<v8>:32023/42847 -n custFunc -e /Customers.Id -from /Customers

1. pc62(7777)<v8>:32023/42847 (server1): index created: custFunc
	
elapsed (msec): 5

gfsh:/Customers>index                                                                            
	
1. pc62(7777)<v8>:32023/42847 (server1): 
Row  Name      Type         Expression     From
---  ----      ----         ----------     ----
1    custFunc  FUNCTIONAL   /Customers.Id  /Customers
2    custPK    PRIMARY_KEY  /Customers.Id  /Customers

gfsh:/Customers>index -stats -g -all 

1. pc62(7874)<v9>:46611/47759 (server2): 
Row  Name   Type         Expression    From
---  ----   ----         ----------    ----
1    func1  FUNCTIONAL   o.customerId  /Orders o
2    pk1    PRIMARY_KEY  Id            /Orders
	
2. pc62(7777)<v8>:32023/42847 (server1): 
Row  Name      Type         Expression     From
---  ----      ----         ----------     ----
1    custFunc  FUNCTIONAL   /Customers.Id  /Customers
2    custPK    PRIMARY_KEY  /Customers.Id  /Customers
3    func1     FUNCTIONAL   o.customerId   /Orders o
4    pk1       PRIMARY_KEY  Id             /Orders

Delete an index:


gfsh:/Customers>index -d -m pc62(7777)<v8>:32023/42847 -n custFunc                               

This command will remove the custFunc index from the /Customersregion. 
Do you want to proceed? (yes|no): yes
1. pc62(7777)<v8>:32023/42847 (server1): index deleted from /Customers
	
elapsed (msec): 5

gfsh:/Customers>index -stats -all                                                                

1. pc62(7874)<v9>:46611/47759 (server2): 
Row  Name   Type         Expression    From
---  ----   ----         ----------    ----
1    func1  FUNCTIONAL   o.customerId  /Orders o
2    pk1    PRIMARY_KEY  Id            /Orders

2. pc62(7777)<v8>:32023/42847 (server1): 
Row  Name    Type         Expression     From
---  ----    ----         ----------     ----
1    custPK  PRIMARY_KEY  /Customers.Id  /Customers
2    func1   FUNCTIONAL   o.customerId   /Orders o
3    pk1     PRIMARY_KEY  Id             /Orders

Options are:

-g

Applicable for all members

-m <member id>

Execute the index command on the specified member only

-all

Applicable for all regions

-r <region path>

Region path. If not specified, the current region is used.

-d

Delete the specified index in the current or specified region.