Creating index for query in aem6.3 which has a path that is dynamic | Community
Skip to main content
srinivas_chann1
Level 7
July 28, 2020
Solved

Creating index for query in aem6.3 which has a path that is dynamic

  • July 28, 2020
  • 2 replies
  • 1707 views

Hi,

I have component that sends a query  based on the path selected from dialog .This is basically a case when we need to generate reports data based on different path author wants

 

like the author could select path: /content/project/abc

then they could select a different path like : /content/project/def

 

Then we would get a different report. Since a query may slow down the system based on the results it needs to get.

 

Please let me know what should be approach for this as path is dynamic here

 

How could i create index from below for such a use case

You can create an index of your query on the Oak Index Definition Generator:

https://oakutils.appspot.com/generate/index

 

Generating custom indexes on queries:

https://helpx.adobe.com/experience-manager/kb/create-custom-oak-index.html

 

Thanks

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Shashi_Mulugu

@srinivas_chann1 what kind of reports you are trying to generate? How much content do you hold and expected in future? Do you also need to query DAM assets? Is the query execution on author or publisher?

 

If data is a small subset, I would just go with cq:pagelucene or cq:damlucene in oak definitions to add all required properties you do search.

 

If data is huge or multiple operations I would recommend to have a separate search servers such as solr etc..

2 replies

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
July 28, 2020

@srinivas_chann1 what kind of reports you are trying to generate? How much content do you hold and expected in future? Do you also need to query DAM assets? Is the query execution on author or publisher?

 

If data is a small subset, I would just go with cq:pagelucene or cq:damlucene in oak definitions to add all required properties you do search.

 

If data is huge or multiple operations I would recommend to have a separate search servers such as solr etc..

srinivas_chann1
Level 7
July 28, 2020

Thanks for the input. The data is small subset, but like I mentioned if the query for 2 authors could be different  based on path. Then how will be index be for this.

 

Should I create 4 different index or just 1 index and say   if path could support any wildcard path like /content/product/*

 

{path=/content/product/abc1, p.limit=-1, property.value=/apps/components/test1, property=sling:resourceType, type=nt:unstructured}
{path=/content/product/def2, p.limit=-1, property.value=/apps/components/test1, property=sling:resourceType, type=nt:unstructured}
{path=/content/product/def3, p.limit=-1, property.value=/apps/components/test1, property=sling:resourceType, type=nt:unstructured}
{path=/content/product/def4, p.limit=-1, property.value=/apps/components/test1, property=sling:resourceType, type=nt:unstructure}

 

Thanks

Vijayalakshmi_S
Level 10
July 29, 2020

Hi @srinivas_chann1,

Before deciding on creating custom index definition, I suggest to

Given that you confirm the data volume to be small, there might not be a need to create custom one. (provided the content volume is arrived at considering long run)

If you are still looking for creating one, request to share the query predicate that you are using, I will try in my local and share sample custom index definition.