この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
5.6.1 upgraded to 6.1 environment.
We have the following XPath generated by QueryBuilder (some node names changed):
/jcr:root/content/company1/application1/en//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/company1/templates/application1/exceptionpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/manualpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/guidelinepage' or jcr:content/@cq:template = '/apps/company1/templates/application1/formpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/bulletinpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/realstatepraticespage') and jcr:content/st-documentNode/@docExist = 'true' and (jcr:contains(jcr:content/st-documentNode/documentName, 'ALTA') or jcr:contains(., 'ALTA'))] order by @jcr:score descending
When the query is executed in AEM 6.1 CRX DE, it appears that the sort order does not have any effect on the order of returned records (nodes). Even when order by clause removed, the query produces records in the same order.
In the same query, executed in 5.6.1, change in the order by clause actually results in change of the result set records (nodes) order.
Any Ideas where I might be doing wrong?
Regards,
-N
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
With AEM 6.1 - Indexing plays a role that was not in 5.6.
https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html
I recommend watching this GEMs session:
http://dev.day.com/content/ddc/en/gems/oak-lucene-indexes.html
表示
返信
いいね!の合計
With AEM 6.1 - Indexing plays a role that was not in 5.6.
https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html
I recommend watching this GEMs session:
http://dev.day.com/content/ddc/en/gems/oak-lucene-indexes.html
表示
返信
いいね!の合計
Thanks... I'll do that!
Regards,
-N
表示
返信
いいね!の合計
Hi Scott,
Thanks for the good pointers, I did some reading on OAK indexes and came up with the following index definition:
/oak:index/vuDocumentsIndex (oak:QueryIndexDefinition) - compatVersion = 2 - type = "lucene" - async = "async" - evaluatePathRestrictions = true + indexRules (nt:unstructured) + cq:Page (nt:unstructured) + properties + template - propertyIndex = true - name = "jcr:content/cq:template" + docExists - propertyIndex = true - name = "jcr:content/st-documentNode/docExist" + docSusp - propertyIndex = true - name = "jcr:content/st-documentNode/susDisp" + docName - name = "jcr:content/st-documentNode/documentName" - analyzed = true + theNodeProps - name = ".*" - isRegexp = true - nodeScopeIndex = true
I was hoping to get the following XPath Query to use the index:
/jcr:root/content/st/vu/en//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/st/templates/vu/exceptionpage' or jcr:content/@cq:template = '/apps/st/templates/vu/manualpage' or jcr:content/@cq:template = '/apps/st/templates/vu/guidelinepage' or jcr:content/@cq:template = '/apps/st/templates/vu/formpage' or jcr:content/@cq:template = '/apps/st/templates/vu/bulletinpage' or jcr:content/@cq:template = '/apps/st/templates/vu/realstatepraticespage') and jcr:content/st-documentNode/@docExist = 'true' and (jcr:contains(jcr:content/st-documentNode/documentName, 'ALTA') or jcr:contains(., 'ALTA'))] order by @jcr:score descending
Few challenges I have:
Where possible I'm going wrong? Any help is appreciated.
Regards.
-N
表示
返信
いいね!の合計
Just an update:
Managed to create/reindex the query:
/oak:index/vuDocumentsIndex
Here is the final version:
/oak:index/vuDocuments (oak:QueryIndexDefinition) - compatVersion = 2 - type = "lucene" - async = "async" - evaluatePathRestrictions = true - queryPaths = ["/content/st/vu/en"] - includedPaths = ["/content/st/vu/en"] + indexRules (nt:unstructured) + cq:Page (nt:unstructured) + properties + template - propertyIndex = true - name = "jcr:content/cq:template" + docExists - propertyIndex = true - name = "jcr:content/st-documentNode/docExist" + docSusp - propertyIndex = true - name = "jcr:content/st-documentNode/susDisp" + docName - name = "jcr:content/st-documentNode/documentName" - analyzed = true + theNodeProps - name = ".*" - isRegexp = true - nodeScopeIndex = true
It appears that the value of the async property had an extra space i.e. "async ". Fixing that, plus adding includePaths and queryPaths seems to resolve issue 1.
But I still have issue 2 - the query does not utilize the index. Any ideas?
Regards,
-N
表示
返信
いいね!の合計