I have two quite similar add-ons which uses the same name for a field.
Yesterday, it took me ages to find out why my field in 'add.on2' did not index, and it turned out that the indexer of 'add.on1' is still run (used), even if the add-on is not installed.
Is there a way to limit the indexer to just the installed add-on ?
PS: I added the indexer with plonecli and used it for 'all folders'.
i do the following for subscribers, but for indexer it should be work similarly
from plone.browserlayer.utils import registered_layers
# Handler/Subscriber
def onUserLoggedInEvent(event):
layers = registered_layers()
if MyAddonBrowserLayer not in layers:
""" nothing to do, addon is not installed in the plonesite
"""
return