AEM 6.5 - Querying against Synthetic resources

Avatar

Avatar

kimonp31365843

Avatar

kimonp31365843

kimonp31365843

27-02-2021

Hi everyone,

 

We have the following scenario in place:

  • We want to create a MyItems listing page
  • Every MyItem consists of a page containing (among others)
    • MyItem Banner component
    • MyItem Config component
  • In the listing page, we need to query against and extract facets from
    • MyItem Banner component props
    • MyItem Config component props
      • Some prop values are not stored directly but (when the MyItem page is rendered) are retrieved on-the-fly from an external integration

Questions:

  • Is it possible to have a "unified" query to use in the listing page, considering we have different sources of information for each listable element?
  • I was thinking of leveraging Synthetic resources (e.g. create MyItemSyntehticResource with all required props and then query against these)
  • In previous versions maybe that could also be possible via custom ResourceProvider implementation
  • So far I am unsure how to go about it - or if it's at all possible 🙂

 

Any ideas?

 

Kind regards

 

 

6.5 querybuilder synthetic
View Entire Topic

Avatar

Avatar

KiranVedantam1992

Avatar

KiranVedantam1992

KiranVedantam1992

27-02-2021

Hi @kimonp31365843,

 

For the use-case that you have mentioned, you can do the below steps

  • Let the page load - with all the pros in the required components
  • Once the load is completed, make an ajax call to the servlet and send the page path
  • In the servlet, using page path, fetch the page resource and then the component eventually - with the values already available
  • Then use the query to show the results

Note: This might impact the query results if the page load is slow.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.