Hello, i created lucene index for several properties in AEM 6.1 SP1, index created on 4 servers and work great on 3 servers, but it does not work on 4-th server.
AEM not uses index only on 4-th server, on all other servers everything works as expected.
How to troubleshoot the issue?
Views
Replies
Total Likes
Hi,
you should use the the ACS indexing tools to determine which index is actually used on the 4th server instead of your index. This should help you start your debugging to determine why this index is not used.
Regards,
Opkar
Views
Replies
Total Likes
i tried to use explain query, but nothing used instead of my index
Views
Replies
Total Likes
Did you re-index the content on the 4th environment? Can you copy the output of query explanation [0], it should show you which indexes were consulted and what was used.
Regards,
Opkar
[0]https://adobe-consulting-services.github.io/acs-aem-tools/explain-query.html
Views
Replies
Total Likes
Index configuration:
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" evaluatePathRestrictions="{Boolean}true" compatVersion="{Long}2" type="lucene" async="async" jcr:primaryType="{Name}oak:QueryIndexDefinition"> <indexRules jcr:primaryType="{Name}nt:unstructured"> <cq:PageContent jcr:primaryType="{Name}nt:unstructured"> <properties jcr:primaryType="{Name}nt:unstructured"> <publishDate ordered="{Boolean}true" propertyIndex="{Boolean}true" nullCheckEnabled="{Boolean}true" name="publishDate" jcr:primaryType="{Name}nt:unstructured"/> <jcrLanguage name="jcr:language" propertyIndex="{Boolean}true" nullCheckEnabled="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> <slingResourceType name="sling:resourceType" propertyIndex="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> <jcrTitle name="jcr:title" analyzed="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> <jcrDescription name="jcr:description" analyzed="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> <cqTags name="cq:tags" propertyIndex="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> <videoId name="videoPlayer/videoid" propertyIndex="{Boolean}true" jcr:primaryType="{Name}nt:unstructured"/> </properties> </cq:PageContent> </indexRules> </jcr:root>
Query:
/jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending
Explain query on working server:
[cq:PageContent] as [a] /* lucene:content-search-index(/oak:index/content-search-index) +:ancestors:/content +cq:tags:NAMESPACE:Tag +sling:resourceType:my-site/components/articlepage/articlePage ordering:[{ propertyName : publishDate, propertyType : UNDEFINED, order : DESCENDING }] where ([a].[sling:resourceType] = 'my-site/components/articlepage/articlePage') and ([a].[cq:tags] = 'NAMESPACE:Tag') and (isdescendantnode([a], [/content])) */
Explain query on broken server:
[cq:PageContent] as [a] /* property slingResourceType = my-site%2Fcomponents%2Farticlepage%2FarticlePage where ([a].[sling:resourceType] = 'my-site/components/articlepage/articlePage') and ([a].[cq:tags] = 'NAMESPACE:Tag') and (isdescendantnode([a], [/content])) */
Views
Replies
Total Likes
Hi,
it was the full text below what you have pasted that explains which index was used and why. Please see attached screenshot. Can you paste that?
Regards,
Opkar
Views
Replies
Total Likes
Can't run ACS tool on broken server because this server is publisher and i didn't receive correct response.
Views
Replies
Total Likes
finally i found the way to get it from publisher:
Result on working server:
{ "statement": "/jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending", "language": "xpath", "explain": { "logs": [ "cost using filter Filter(query=explain select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [sling:resourceType] = 'my-site/components/articlepage/articlePage' and [cq:tags] = 'NAMESPACE:Tag' and isdescendantnode(a, '/content') order by [publishDate] desc /* xpath: /jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending */, path=/content//*, property=[cq:tags=[NAMESPACE:Tag], sling:resourceType=[my-site/components/articlepage/articlePage]])", "cost for aggregate lucene is Infinity", "Evaluating plan with index definition Lucene Index : /oak:index/content-search-index", "Applicable IndexingRule found IndexRule: cq:PageContent", "Evaluating plan with index definition Lucene Index : cqTag(/oak:index/cqTagLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : workflow(/oak:index/workflowDataLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : authorizables(/oak:index/authorizables)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : /oak:index/damAssetLucene", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : tags(/oak:index/ntBaseLucene)", "Applicable IndexingRule found IndexRule: nt:base", "Evaluating plan with index definition Lucene Index : /oak:index/lucene", "Index is old format. Not supported", "Evaluating plan with index definition Lucene Index : cq:Page(/oak:index/cqPageLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "cost for lucene-property[/oak:index/content-search-index] is 334.3333333333333", "cost for reference is Infinity", "getPlans(Filter, List<OrderEntry>, NodeState)", "getPlans() - filter: Filter(query=explain select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [sling:resourceType] = 'my-site/components/articlepage/articlePage' and [cq:tags] = 'NAMESPACE:Tag' and isdescendantnode(a, '/content') order by [publishDate] desc /* xpath: /jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending */, path=/content//*, property=[cq:tags=[NAMESPACE:Tag], sling:resourceType=[my-site/components/articlepage/articlePage]]) - ", "getPlans() - sortOrder: [{ propertyName : publishDate, propertyType : UNDEFINED, order : DESCENDING }] - ", "getPlans() - rootState: { jcr:primaryType = rep:root, jcr:mixinTypes = [rep:RepoAccessControllable, rep:AccessControllable], sling:target = /index.html, sling:resourceType = sling:redirect, crx = { ... }, :async : { async-temp = [5b7c9b0c-af60-4db5-a899-8438ee62bccf, b5ab6fae-ac89-4cb9-92aa-488211131b3b], async = 5b7c9b0c-af60-4db5-a899-8438ee62bccf, async-LastIndexedTo = 2016-06-02T17:54:59.810Z }, tmp = { ... }, home = { ... }, :clusterConfig : { :clusterId = 5778ac61-a3c0-4232-a044-40eb7ab3c1dd }, oak:index = { ... }, conf = { ... }, jcr:system = { ... }, etc = { ... }, system = { ... }, content = { ... }, bin : { jcr:primaryType = nt:folder, jcr:mixinTypes = [mix:versionable], jcr:createdBy = admin, jcr:versionHistory = 46d5eb8b-8d69-4c9b-9591-4e0153d8f195, jcr:predecessors = [], jcr:created = 2015-12-29T19:17:19.078Z, jcr:baseVersion = f38fd84b-139e-4655-82cd-8782ad07643e, jcr:isCheckedOut = false, jcr:uuid = 40ed38c9-cb13-41dc-8602-0249e2c1b4c2 }, rep:policy = { ... }, libs = { ... }, rep:repoPolicy = { ... }, var = { ... }, apps = { ... } } - ", "cost for ordered is Infinity", "cost for nodeType is 3229.0", "property cost for slingResourceType is 1414.0", "cost for property is 1414.0", "cost for traverse is 1605100.0" ], "plan": "[cq:PageContent] as [a] /* lucene:content-search-index(/oak:index/content-search-index) +:ancestors:/content +cq:tags:NAMESPACE:Tag +sling:resourceType:my-site/components/articlepage/articlePage ordering:[{ propertyName : publishDate, propertyType : UNDEFINED, order : DESCENDING }] where ([a].[sling:resourceType] = 'my-site/components/articlepage/articlePage') and ([a].[cq:tags] = 'NAMESPACE:Tag') and (isdescendantnode([a], [/content])) */" }, "heuristics": { "executeTime": 2, "getNodesTime": 6, "count": 4843, "countTime": 341, "totalTime": 349 } }
Views
Replies
Total Likes
Result on broken server
{ "statement": "/jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending", "language": "xpath", "explain": { "logs": [ "cost using filter Filter(query=explain select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [sling:resourceType] = 'my-site/components/articlepage/articlePage' and [cq:tags] = 'NAMESPACE:Tag' and isdescendantnode(a, '/content') order by [publishDate] desc /* xpath: /jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending */, path=/content//*, property=[cq:tags=[NAMESPACE:Tag], sling:resourceType=[my-site/components/articlepage/articlePage]])", "cost for aggregate lucene is Infinity", "Evaluating plan with index definition Lucene Index : /oak:index/content-search-index", "Applicable IndexingRule found IndexRule: cq:PageContent", "Evaluating plan with index definition Lucene Index : cqTag(/oak:index/cqTagLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : workflow(/oak:index/workflowDataLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : authorizables(/oak:index/authorizables)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : /oak:index/damAssetLucene", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "Evaluating plan with index definition Lucene Index : tags(/oak:index/ntBaseLucene)", "Applicable IndexingRule found IndexRule: nt:base", "Evaluating plan with index definition Lucene Index : /oak:index/lucene", "Index is old format. Not supported", "Evaluating plan with index definition Lucene Index : cq:Page(/oak:index/cqPageLucene)", "No applicable IndexingRule found for any of the superTypes [sling:VanityPath, sling:Resource, cq:ReplicationStatus, cq:OwnerTaggable, nt:unstructured, cq:Taggable, nt:base, cq:PageContent, mix:created, mix:title]", "cost for lucene-property[/oak:index/content-search-index] is 334.3333333333333", "cost for reference is Infinity", "getPlans(Filter, List<OrderEntry>, NodeState)", "getPlans() - filter: Filter(query=explain select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [sling:resourceType] = 'my-site/components/articlepage/articlePage' and [cq:tags] = 'NAMESPACE:Tag' and isdescendantnode(a, '/content') order by [publishDate] desc /* xpath: /jcr:root/content//element(*, cq:PageContent)[(@sling:resourceType = 'my-site/components/articlepage/articlePage' and @cq:tags='NAMESPACE:Tag')] order by @publishDate descending */, path=/content//*, property=[cq:tags=[NAMESPACE:Tag], sling:resourceType=[my-site/components/articlepage/articlePage]]) - ", "getPlans() - sortOrder: [{ propertyName : publishDate, propertyType : UNDEFINED, order : DESCENDING }] - ", "getPlans() - rootState: { jcr:primaryType = rep:root, jcr:mixinTypes = [rep:RepoAccessControllable, rep:AccessControllable], sling:target = /index.html, sling:resourceType = sling:redirect, crx = { ... }, :async : { async-temp = [f667c2d5-cf26-4e5e-ac7b-356c2b065835, 8b1e72ba-3c41-476b-b509-575ee4a192bf], async = 8b1e72ba-3c41-476b-b509-575ee4a192bf, async-LastIndexedTo = 2016-06-02T17:49:03.759Z }, tmp = { ... }, home = { ... }, :clusterConfig : { :clusterId = 8b4a9354-b404-4768-bc46-c0eed95c62c4 }, oak:index = { ... }, conf = { ... }, jcr:system = { ... }, etc = { ... }, system = { ... }, content = { ... }, bin : { jcr:primaryType = nt:folder, jcr:mixinTypes = [mix:versionable], jcr:createdBy = admin, jcr:versionHistory = 420bcd9d-c8b5-4363-9e07-a70c54cb7672, jcr:predecessors = [], jcr:created = 2015-12-31T01:23:52.720Z, jcr:baseVersion = 440716d2-5df6-46cd-9d6e-e5dd66b3114e, jcr:isCheckedOut = false, jcr:uuid = 40ed38c9-cb13-41dc-8602-0249e2c1b4c2 }, rep:policy = { ... }, libs = { ... }, rep:repoPolicy = { ... }, var = { ... }, apps = { ... } } - ", "cost for ordered is Infinity", "cost for nodeType is 360.0", "property cost for slingResourceType is 43.0", "cost for property is 43.0", "cost for traverse is 40100.0" ], "plan": "[cq:PageContent] as [a] /* property slingResourceType = my-site%2Fcomponents%2Farticlepage%2FarticlePage where ([a].[sling:resourceType] = 'my-site/components/articlepage/articlePage') and ([a].[cq:tags] = 'NAMESPACE:Tag') and (isdescendantnode([a], [/content])) */", "propertyIndexes": [ "slingResourceType" ] }, "heuristics": { "executeTime": 2, "getNodesTime": 471, "count": 5271, "countTime": 846, "totalTime": 1319 } }
Views
Replies
Total Likes
Are you share the amount of content is the same on both instance? The OOTB indexes have much lower cost values on the broken server:nodeType, traverse and slingResourceType. Whereas for your index content-search-index the cost is exactly the same. Sorry to be pedantic, but the index definition is definitely the same on all servers, you don't have any exclude/include paths set on the 4th server?
All 4 servers are publish instances?
Regards,
Opkar
Views
Replies
Total Likes
so there are 2 QA servers author/publisher and 2 UAT servers author/publisher.
on all QA servers everything works, on UAT author also works, but publisher is broken.
on both QA servers content is the same also on UAT servers content is the same.
index definition installs with a package on all servers so it the same.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies