Running AEM6 SP2, Oak 1.0.11
We have people directory pages which list people by last name alphabetically. I see log messages about node traversal, and want an optimized query. We will end up with maybe 7000 people spread across 120 or so departments... the error message occurs when a request hits the people directory pages. I'm attempting to follow indexing documentation... and it seems like the index should be setup- see attached screenshot from crxde. Oak doesn't seem to use my index, and still uses the cq:template index instead.
[img]Screen Shot 2015-04-15 at 5.09.51 PM.png[/img]
15.04.2015 16:21:08.307 *WARN* [0:0:0:0:0:0:0:1 [1429129268281] GET /content/michigan-lsa/stats/en/people/jcr:content/par/people_list.results.html HTTP/1.1] org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy Traversed 3000 nodes using index cq:template with filter Filter(query= select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] in('/apps/michigan-lsa/templates/department_person_profile', '/apps/michigan-lsa/templates/department_person_secondary_profile') and isdescendantnode(a, '/content/michigan-lsa/stats/en/people') order by [jcr:content/lastName] /* xpath: /jcr:root/content/michigan-lsa/stats/en/people//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/michigan-lsa/templates/department_person_profile' or jcr:content/@cq:template = '/apps/michigan-lsa/templates/department_person_secondary_profile')] order by jcr:content/@lastName */, path=/content/michigan-lsa/stats/en/people//*, property=[jcr:content/cq:template=in(/apps/michigan-lsa/templates/department_person_profile, /apps/michigan-lsa/templates/department_person_secondary_profile)])
Secondly. I would like to use /etc/acs-tools/explain-query.html as suggested in the documentation. But it doesn't work and I see JS errors in the console
Error: [$injector:unpr] http://errors.angularjs.org/1.2.23/$injector/unpr?p0=aProvider%20%3C-%20a at Error (native) at http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:5:9 at http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:400:40 at Object.X [as get] (http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:371:38) at http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:401:43 at X (http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:371:38) at V (http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:380:43) at Object.D.instantiate (http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:386:4) at http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:883:5 at http://localhost:4502/etc/clientlibs/acs-tools/vendor/angularjs.min.js:690:4
Solved! Go to Solution.
Instead, use a Lucene Non Root Index under /content/michigan-lsa/ and add the properties that are refer in your query, also think to optimize your query try to use slingResouceType instead of cq:temple. You can debug your query and the index using ACS Tools
select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] in('/apps/michigan-lsa/templates/department_person_profile', '/apps/michigan-lsa/templates/department_person_secondary_profile') and isdescendantnode(a, '/content/michigan-lsa/stats/en/people') order by [jcr:content/lastName]
There is a good example here : https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
And also check the OAK Lucene Documentation, there is lot of parameters you can use in your Lucene index
If you are following the AEM documentation and encounter errors - there is a bug - please open a ticket here:
https://helpx.adobe.com/marketing-cloud/experience-manager.html
Views
Replies
Total Likes
Instead, use a Lucene Non Root Index under /content/michigan-lsa/ and add the properties that are refer in your query, also think to optimize your query try to use slingResouceType instead of cq:temple. You can debug your query and the index using ACS Tools
select [jcr:path], [jcr:score], * from [cq:Page] as a where [jcr:content/cq:template] in('/apps/michigan-lsa/templates/department_person_profile', '/apps/michigan-lsa/templates/department_person_secondary_profile') and isdescendantnode(a, '/content/michigan-lsa/stats/en/people') order by [jcr:content/lastName]
There is a good example here : https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
And also check the OAK Lucene Documentation, there is lot of parameters you can use in your Lucene index