I have a class. In class there is an index. This index is for quick search on name property.
Property Name as %String;
Index NameInd On Name;
This class is mapped to some global ^GL(userId) = "Name*other data....****"
And there is also index global ^GLNameIndex(Name, userId) = ""
When I add new User entry through class, f. i.
S user = ##class(User).%New()
S user.Name = "Some name"
calling method %Save() adding new entry to index automatically.