


Hi,
I would like to do a search using query and then filter out all the pages which have an effective off time, I understand you need to use page filter but i am not how to use it in conjunction with jcr query.
Thanks
Views
Replies
Sign in to like this content
Total Likes
You can you the PageManager to get a page from a path in a loop over your search hits:
PageManager pm = request.getResourceResolver().adaptTo(PageManager.class); SearchResult result = query.getResult(); for (Hit hit : result.getHits()) { Page page = pm.getContainingPage(hit.getPath()); Filter<Page> pageFilter = new PageFilter(); if (pageFilter.includes(page)) { // Matched... } }
Views
Replies
Sign in to like this content
Total Likes
You can you the PageManager to get a page from a path in a loop over your search hits:
PageManager pm = request.getResourceResolver().adaptTo(PageManager.class); SearchResult result = query.getResult(); for (Hit hit : result.getHits()) { Page page = pm.getContainingPage(hit.getPath()); Filter<Page> pageFilter = new PageFilter(); if (pageFilter.includes(page)) { // Matched... } }
Views
Replies
Sign in to like this content
Total Likes