The decision made may be somewhat unclear, so here are a few clarifications:
1) DO NOT edit the global global setting.
If you are doing something extremely strange, you will install your site as a series of plone extensions and have a folder structure, for example:
app.plugin/ app.plugin/app/ app.plugin/app/configure.zcml app.plugin/app/profiles/ app.plugin/app/profiles/default app.plugin/app/profiles/default/types app.plugin/app/profiles/default/types/Folder.xml app.plugin/app/profiles/default/types/app.mydexteritytype.xml app.plugin/app/profiles/default/types.xml app.plugin/app/profiles/default/portlets.xml app.plugin/app/profiles/default/catalog.xml <---- ADD THIS
2) You do not need to have an xml block (according to the decision) in the catalog.xml file, you can simply create an index from the ZMI interface. However, if you do, it will be reset the next time you plug in your plugins. Therefore, you probably want to.
3) After installing your .xml directory, go to the ZMI interface to portal_catalog and make sure that the pointer exists on the indexes tab. If it is not, you are messed up.
4) To create an index, you need to go to the "advanced" tab and select the rebuild command.
5) The indexer eagerly consumes exceptions and does not raise them (it is especially important for AttributeError, you cannot index some values ββthat you want to index), so if you want to make sure that your indexer is actually running, try adding log or print in it:
@indexer(IMyDexterityType) def dummy_indexer(obj, **kw): try: print('indexed: %r' % obj) return obj.title except Exception as e: print('index fail: %r' % e) return ''
If you donβt see anything else, for example:
2013-08-12 16:42:28 INFO GenericSetup.archetypetool Archetype tool imported. 2013-08-12 16:42:28 INFO GenericSetup.resourceregistry Stylesheet registry imported. 2013-08-12 16:42:28 INFO GenericSetup.resourceregistry Javascript registry imported. indexed: <MyDexterityType at /Plone/test/cat-document-0> indexed: <MyDexterityType at /Plone/test/hello>
6) grok.global_adapter (), as indicated in some documents ( http://developer.plone.org/reference_manuals/external/plone.app.dexterity/advanced/catalog-indexing-strategies.html?highlight=custom%20indexing# creating-custom-indexers ) deals with registering virtual properties and do not mitigate the need to customize your .xml directory.
Finally, someone drew a working example on github, which is very useful:
https://github.com/aclark4life/event_days_indexer