[MGNLPER-75] Autogenerated JcrSearchResultSuppliers ignore app root path Created: 19/Nov/18  Updated: 24/Jan/19  Resolved: 04/Jan/19

Status: Closed
Project: Periscope
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Adam Siska
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 3h
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by MGNLPER-38 Provide SearchResultSuppliers for JCR... Closed
duplicate
is duplicated by MGNLPER-68 Filter out results from apps that can... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Search relevance
Sprint: Foundation 1
Story Points: 3

 Description   

Business benefit: Build trust. Don't mislead the user. Show only relevant search results. 

Summary: If an app cannot display the found content then don't list the app in search results.

E.g. a supplier for the Site app is created, searching whole config workspace.

To reproduce:

  1. Go to Find Bar and search for applauncherlayout

Configuration, Cookies and Site apps are displayed in results. Only the Configuration app has access to the found target node appLauncherLayout. The other two apps can only access a very narrow subtree elsewhere in the config workspace. Since the user has no way of navigating to the appLauncherLayout node in the Cookies and Site apps the results are misleading.

The same issue can be reproduced for categories/tours apps. Search in tours app should not return categories outside of tours app root path.

Acceptance criteria:

  • Report results only from apps that can access the found node/property.


 Comments   
Comment by Roman Kovařík [ 19/Nov/18 ]

https://documentation.magnolia-cms.com/display/DOCS57/Content+connector#Contentconnector-browsersubapp

https://documentation.magnolia-cms.com/display/DOCS60/Content+type+Data+source+definition#ContenttypeDatasourcedefinition-Properties

Comment by Roman Kovařík [ 04/Jan/19 ]

QA:
the current query is:

SELECT * FROM [nt:base] AS t WHERE ((lower(LOCALNAME()) LIKE '%%' AND ISDESCENDANTNODE('/modules/site/config/site')) AND (t.[jcr:primaryType] = 'mgnl:content' OR t.[jcr:primaryType] = 'mgnl:contentNode'))

shouln't that be rather

SELECT * FROM [nt:base] AS t WHERE ((lower(LOCALNAME()) LIKE '%%') AND (t.[jcr:primaryType] = 'mgnl:content' OR t.[jcr:primaryType] = 'mgnl:contentNode')) AND ISDESCENDANTNODE('/modules/site/config/site') 

?
Not sure iff this is related, but if I search for travel, I get no results from the site app.

Comment by Roman Kovařík [ 04/Jan/19 ]

nwm, I overlooked that the OR statement is in brackets.

Not sure iff this is related, but if I search for travel, I get no results from the site app.

Works in the latest EE
The problem is that content of the Site app is defined in CE as extends=/modules/travel-demo/config/travel
https://demo.magnolia-cms.com/.magnolia/admincentral#app:configuration:browser;/modules/site/config/site@extends:treeview:
so it can't be found by findbar search in the Site app supplier.

So for the record: Content of the site app can't be searched as JCR search doesn't take (and can't easily) magnolia extending mechanism into account. The content can be still found by Configuration app search (if user has access to it).
Taking into account that sites will be probably moved into registries (we will see the definitions in the Definitions app so the site app will be deprecated, similarly as former Themes app), not a big issue.

Generated at Mon Feb 12 10:28:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.