Yes, we can rebuild indices by %BuildIndices(). To rebuild specific, named indices we use
I think, you have to delete the index definition in the class. For SQL storage it is IMHO sufficient to have the index definition in the storage.
Just the IDKEY index has to be defined in the class.
I have many data mapped like this and Caché usually uses the indices.
To get Caché to use mapped indices you have different options:
- Use appropriate data types.
- It looks like the collation of your indexed data is "exact". So please use one of these options (or a combination of them) if the data type is %String:
- Property bbb as %String(COLLATION="EXACT");
- select * from loggpro.Indextest where %EXACT(bbb)=123
If all of your indexed data of type %String is collated "exact", it is usefull to subclass the %String datatype and set the COLLATION parameter there. Use the new datatype instead of %String afterwards.
Good luck!
Alex Riemer
I just loaded your sample code in my Studio and compiled it. IMHO %RebuildIndices() should just work. How do you call it?
A hint from me: We've reimplemented %PurgeIndices() as the generated version of ISC deletes the indices very ineffecient - line by line. Our version just kills the appropriate global tree.