Query returns obsolete results | Community
Skip to main content
Level 3
August 4, 2016
Solved

Query returns obsolete results

  • August 4, 2016
  • 4 replies
  • 2172 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Stanleyor

Instance restart has fixed the problem

4 replies

smacdonald2008
Level 10
August 4, 2016

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. 

kautuk_sahni
Community Manager
Community Manager
August 5, 2016

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-indexing.html

~kautuk

Kautuk Sahni
StanleyorAuthor
Level 3
August 5, 2016

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?

StanleyorAuthorAccepted solution
Level 3
August 5, 2016

Instance restart has fixed the problem