xpath returns no results

Avatar

Avatar
Boost 1
Level 1
leonzhao0327
Level 1

Likes

2 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
leonzhao0327
Level 1

Likes

2 likes

Total Posts

7 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
leonzhao0327
Level 1

05-05-2020

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Vish_dhaliwal
Employee

06-05-2020

Hello,

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

Regards,

Vishu

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

06-05-2020

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#m...