[MGNLREST-111] Evaluate disabling same-node-type recursivity Created: 04/Sep/17  Updated: 17/Jan/18  Resolved: 17/Jan/18

Status: Closed
Project: Magnolia REST Framework
Component/s: delivery
Affects Version/s: 2.0
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Mikaël Geljić Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)
Story Points: 5

 Description   

In early new implementation of the JcrDeliveryEndpoint, depth is set to 0 by default, while node-type configuration only specifies which node-types are "servable".
But setting depth = 2 for a page might return sub-pages as well.

In particular for the query, collection-returning endpoint method: if a page and one of its sub-pages match the given query, we don't want the sub-page to be part of "result" of the parent one, thus avoiding duplicate info. One approach for this is:

Once a "top-result" item is resolved from the JCR query, exclude its sub-nodes of similar type, but include others. e.g. a page would be returned with all its areas and components, but without its sub-pages.

Additional notes:

  • With this, we could even afford to set the depth default value as "unlimited".
  • Maybe folders need to be further excluded from results (content delivery should not serve a whole tree, and dump the heavy-lifting onto the client)
  • Proposal to indicate in the response that some "recursive" child-nodes are hidden, is welcome
  • WorkspaceParameters can still be changed


 Comments   
Comment by Mikaël Geljić [ 17/Jan/18 ]

This was superseded in 2.0 by having separate configuration for nodeTypes and childNodeTypes.

Generated at Mon Feb 12 06:56:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.