--- a/src/pyams_content_es/shared/view/__init__.py Fri Jan 18 15:43:08 2019 +0100
+++ b/src/pyams_content_es/shared/view/__init__.py Fri Feb 15 12:57:33 2019 +0100
@@ -20,6 +20,7 @@
from pyams_catalog.query import CatalogResultSet
from pyams_content.features.search import ISearchFolder
+from pyams_content.shared.common import IGNORED_CONTENT_TYPES
from pyams_content.shared.view.interfaces import IViewQuery, \
IViewQueryEsParamsExtension, IViewQueryFilterExtension, IViewUserQuery, IWfView, RELEVANCE_ORDER
from pyams_content.shared.view.portlet import SEARCH_EXCLUDED_ITEMS
@@ -62,6 +63,7 @@
if content_path is not None:
params &= Q('term', **{'parent_ids': content_path})
# check content types
+ params &= Q('bool', must_not=Q('terms', **{'content_type': tuple(IGNORED_CONTENT_TYPES.keys())}))
content_types = view.get_content_types(context)
if content_types:
params &= Q('terms', **{'content_type': content_types})