This took me a while to grok and perhaps by mentioning it here, it'll prevent other people from making the same mistake as I did and perhaps preventing myself from doing the same mistake again.
In the ZCatalog, when you set up indexes you can give them a name and an index attribute. If you omit the index attribute, it'll try to hook into the objects by the name of the index. For example, if you set the index to be title
with no indexed attribute it'll fetch the title
attribute of the objects it catalogs. But if you set the indexed attribute to be something like idx_getTitle
you can do something like this in your class:
def idx_getTitle(self):
""" return title as we want it to be available in the ZCatalog """
return re.sub('<*.?>','', self.title)
The same can not be done with indexes of type DateIndex
.