Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Query returns obsolete results

Avatar

Level 3

2 days ago I renamed some nodes on a production Author system. Now I've found out that a XPath query returns old paths results.

For example a path /a/de_CH/c was renamed to /a/de_DE/c. Currently a XPath query returns /a/de_CH/c that does not exist anymore

Inconsistency exists on Author where there are approximately 1 million pages. I don't want to reindex everything. I know which pages I renamed. Is it possible to reindex just part of a tree? 

CQ 5.6.1 (SP2)

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 3

Instance restart has fixed the problem

View solution in original post

4 Replies

Avatar

Level 10

Try using JCR SQL2 to see if the path is returned. I am thinking issue is with xpath which is not really recommended way to query the AEM JCR. 

Avatar

Administrator

Hi 

Agreeing with Scott here, use JCR SQL2.

Best Practices for Queries and indexing :-https://docs.adobe.com/content/docs/en/aem/6-1/deploy/best-practices/best-practices-for-queries-and-...

~kautuk



Kautuk Sahni

Avatar

Level 3

You are right. SQL-2 returns correct results. Thank you

I'm acknowledged that everything except SQL-2 is deprecated. (Practice shows that sometimes XPath is much faster than SQL-2 and SQL-2 joins are really slow. But that's not a subject of our discussion)

That is not our code. The initiator of this request is Siteadmin search. The complete sequence is: Siteadmin search functionality -> querybuilder request -> XPath query

Is it possible to make Siteadmin Search (Fulltext search) use SQL-2 instead of XPath?

Avatar

Correct answer by
Level 3

Instance restart has fixed the problem