Query does not return newly added pages in results | Community
Skip to main content
Level 2
Jan 25, 2020 8:00 AM UTC
Solved

Query does not return newly added pages in results

Hi,

 

In one of the AEM instance, we face an issue with query results.

Forex: 

if my query is ---- select * from nt:unstructured where cq:template = '/apps/projectname/templatepath' and jcr:path like '/content/projectname/%'

it returns a set of pages which matching template.

However, newly added pages of that template are not returned as part of the query result.

NOTE: This occurs only in one instance, not in other (which is exact clone of -- not working AEM instance).

What might be the cause of missing new pages in query results?

arunpatidar26, Ratna Kumar, smacdonald2008

JaideepBrar

Thanks,
Sundari.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
sundarig9086821Accepted solution
Level 2
Jan 27, 2020 1:39 PM UTC

Hi,

The issue resolved when we checked ntbaselucene index(which showed in execution plan while executing query), which had a property "corrupt".

Hence we removed ntbaselucene and installed the correct one from other instance.

Then the query result worked fine as expected.

5 replies

sundarig9086821AuthorAccepted solution
Level 2
Jan 27, 2020 1:39 PM UTC

Hi,

The issue resolved when we checked ntbaselucene index(which showed in execution plan while executing query), which had a property "corrupt".

Hence we removed ntbaselucene and installed the correct one from other instance.

Then the query result worked fine as expected.

Translate
Employee
Jan 26, 2020 4:59 PM UTC

Most Likely, this issue is caused by indexing.

 

Check [1] to validate if indexes are corrupted or not updating every 5 seconds.

 

[1] http://<host>:<port>/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Dasync%2Ctype%3DIndexStats

Translate
Level 2
Jan 27, 2020 1:33 PM UTC
Hi,
Translate
Level 2
Jan 26, 2020 3:16 AM UTC

Check if there are any spaces after the template path in newly created pages or this could be an issue with indexing. So try re-indexing the cq:template property here /oak:index/cqTemplate

 

Thanks,
Amogh

Translate