Adds an index to this map for the specified entries so
that queries can run faster.
Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.7.1
Syntax
Parameters
- attribute
- Type: SystemString
attribute of value - ordered
- Type: SystemBoolean
true if index should be ordered, false otherwise.
Remarks
public class Employee :IPortable { private bool active = false; private int age; private string name = null; // other fields. }
var imap = Hazelcast.GetMap("employees"); imap.AddIndex("age", true); // ordered, since we have ranged queries for this field imap.AddIndex("active", false); // not ordered, because boolean field cannot have range
See Also