Hi all,
We are running into a weird situation that the same query works on one pub server, but not the other. The query has been working fine for years on both pub servers. The oak:index is the same on both. The query is:
/jcr:root/content/site//element(*,cq:PageContent)[@sling:resourceType='site/components/pages/event' and (@datestamps >= '2023-05-01' and @datestamps <= '2023-05-31') ]/eventTimes//element(*, nt:unstructured) order by @date ascending
Content structure is as:
events
+-- test event
+--jcr:content
+--title
+--datestamps
+--eventTimes
+--time_1
|
+--time_2
Where eventTimes and time_x is nt:unstructured. The above structure shows an event has multiple event times. This query has been working for at least 6 years, and all of a sudden it stops working on one publish server. I reindexed it, no luck. If I take out the sorting condition "/eventTimes//element(*, nt:unstructured) order by @date ascending", it will work. Any idea where I should troubleshoot?
Thanks a lot!
-kt
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @kevingtan
@kevingtan Are you getting error in the logs in that publish instance? Have you tried using the Explain query tool and run the query in that publish instance and see what could be the issue.
https://adobe-consulting-services.github.io/acs-aem-tools/features/explain-query/index.html
Also you can do the index consistency check
Hi @kevingtan ,
Since you mentioned that after removing sorting condition "/eventTimes//element(*, nt:unstructured) order by @date ascending" it is working so I believe the issue should be because of content unavailability on that pub server. Are you getting 'No results found' on this server? Please check you have the content available.
Thanks,
Ritesh Mittal
Yes I tried explain query, query builder, etc. Both publish servers are the same, but the actual results are different. I can try the oak-run to reindex the content.
The content articles are in the repository, just not showing up from the query. All properties are the same on both publish servers.
Hello @kevingtan
Views
Likes
Replies
Views
Likes
Replies