xpath returns no results | Community
Skip to main content
Level 2
May 6, 2020 6:03 AM UTC
Solved

xpath returns no results

I have two aem 6.3 instances, called cq1 and cq2, they have same content and assets.

 

When I tried xpath query on cq1 with /jcr:root/content//*[jcr:contains(@fileReference, 'xxx.png' )]

I can get correct results.

 

When I tried same query on cq2, for some assets I can't get any result for other I just can get some old references, can't see any new's.

But if I change the query to /jcr:root/content//*[(@fileReference = 'xxx.png' )] it will return correct results.

 

I want know why I can not get correct result when I using "jcr:contains" in my query.

 

※instance restarting does not solve this problem.

 

 

Issue solved by re-index.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vish.dhaliwalAccepted solution
Employee
May 6, 2020 2:19 PM UTC

Hello,

Check the query and index troubleshooting webinar: https://helpx.adobe.com/experience-manager/kt/eseminars/gems/AEM-Query-and-Index-Troubleshooting2.html

Regards,

Vishu

 

 

2 replies

vish.dhaliwalAccepted solution
Employee
May 6, 2020 2:19 PM UTC

Hello,

Check the query and index troubleshooting webinar: https://helpx.adobe.com/experience-manager/kt/eseminars/gems/AEM-Query-and-Index-Troubleshooting2.html

Regards,

Vishu

 

 

Translate
arunpatidar
New Participant
May 6, 2020 8:19 AM UTC

Hi,

Please enable to logging and check.

If content same then could be issue with indexing.

Use Explain query to check which index is used and what is configured there

https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/operations-dashboard.html#main-pars_title_1097830066

 

Translate
Arun Patidar