plone / plone.api

The Plone API
https://6.docs.plone.org/plone.api
Other
86 stars 53 forks source link

Add add indexes method to api.portal #404

Open MrTango opened 6 years ago

MrTango commented 6 years ago

adding indexes to the portal_catalog is not easy or at least not well documented and it's not recommented to do it with generic setup profiles, because of the lag of reindexing options and the rist of empty indexes on reinstalling the addon.

We have good examples how to do it in a setuphandler, but this could be solved once and for all by providing a central method in CMFPlone in utils or so and add this also to the plone.api.portal module.

for example code see https://gist.github.com/MrTango/0ec0c0830fec0b9626d2cbdc69cf20cf

MrTango commented 6 years ago

maybe also allow to add a catalog column (meta data column) with the same method or another one.