File tree Expand file tree Collapse file tree 3 files changed +263
-252
lines changed
src/recensio/plone/browser Expand file tree Collapse file tree 3 files changed +263
-252
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ Changelog
1919- Add collective.solr and make the eea.facetednavigation view compatible with that [gyst]
2020- Activate fulltext PDF solr search, provide upgrade, adjust tests [gyst]
2121- Bugfix PublicationsViewlet for the Plone upgrade [gyst]
22+ - Aplly vanilla new collective.solr search [gyst]
2223
23241.0.6 (2025-05-22)
2425------------------
Original file line number Diff line number Diff line change 1+ from collective .solr .browser .facets import SearchView
12from eea .facetednavigation .browser .app .query import FacetedQueryHandler
23from plone import api
34from plone .app .contentlisting .interfaces import IContentListing
45from plone .base .navigationroot import get_navigation_root
5- from Products .CMFPlone .browser .search import Search
66from Products .CMFPlone .utils import normalizeString
77from Products .Five .browser import BrowserView
88from recensio .plone import _
@@ -70,9 +70,20 @@ def criteria(self, **kwargs):
7070 return criteria
7171
7272
73- class RecensioSearch (Search , ListingBase ):
73+ class RecensioSearch (SearchView , ListingBase ):
7474 """Add recensio capabilities"""
7575
76+ def filter_query (self , query ):
77+ """Avoid throwing Unauthorized.
78+
79+ Solr indexes across sibling sites recensio, regio, altertum. We should
80+ return results only from the current site.
81+ """
82+ query = super (RecensioSearch , self ).filter_query (query )
83+ if "path" not in query and "parent_path" not in query :
84+ query ["path_parents" ] = "/" .join (api .portal .get ().getPhysicalPath ())
85+ return query
86+
7687
7788class ReviewSectionsListing (ListingBase ):
7889 @property
You can’t perform that action at this time.
0 commit comments