The indexing filter consists of python code that works with two parameters:
context is the currently iterated object to be indexed
meta_ids is the list of content-classes that should be indexed.
The applied code can define rules based on the context's attributes values whether indexing shall happen or not. The returning value of the filter rules must be True or False. A simple example will illustrate how it can be applied; the intention would be "Do not index any inactive node, it's descendants and nodes having type-attribute set to 'Resource'".
##
return (context.meta_id in meta_ids) \
and not [ob for ob in context.breadcrumbs_obj_path() if not ob.isActive(context.REQUEST)] \
and not context.attr('attr_dc_type')=='Resource'
Ref: https://github.com/idasm-unibe-ch/unibe-cms-opensearch/issues/21
The indexing filter consists of python code that works with two parameters:
The applied code can define rules based on the context's attributes values whether indexing shall happen or not. The returning value of the filter rules must be True or False. A simple example will illustrate how it can be applied; the intention would be "Do not index any inactive node, it's descendants and nodes having type-attribute set to 'Resource'".
default: