AEM 6.5.4 Query predicate fulltext with type cq:Page does not search query term under all the child nodes but only to a certain depth

Avatar

Avatar
Level 1
akashdeepm
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
akashdeepm
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
akashdeepm
Level 1

08-04-2021

My current query with predicate type=cq:Page does not finds property from subNode but only finds till node level propNode 

/ jcr:content / comp-par / component / section / propNode / subNode


CurrentQuery:
-------------------
fulltext=Search Term
group.p.or=true
group.1_path=/content/proj/sub/us
group.1_group.type=cq:Page
group.2_path=/content/dam/proj/sub/us
group.2_group.type=dam:Asset

But when i remove the "group.1_group.type=cq:Page" then below fulltext query looks under entire depth and fetch all nodes containing the term

UpdatedQuery:
-------------------
fulltext=Search Term
group.p.or=true
group.1_path=/content/proj/sub/us
group.2_path=/content/dam/proj/sub/us
group.2_group.type=dam:Asset

With this nodes containing search term are returned while we expect the cq:page to be returned as in previous query.

Do we know what controls the depth for fulltext search with type=cq:Page. fulltext query without the type looks under entire depth.

And how can we get only cq:Page in search results when using updated query.

cc @kautuk_sahni Jörg_Hoh Arun_Patidar
Thanks

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 10
Employee
DivrajSingh
Employee

Likes

8 likes

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Ignite 5
Boost 5
Boost 3
View profile

Avatar
Give Back 10
Employee
DivrajSingh
Employee

Likes

8 likes

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Ignite 5
Boost 5
Boost 3
View profile
DivrajSingh
Employee

11-05-2021

Hi @akashdeepm 

As you must be aware queries like these work based on indexes in AEM. So if you try to search for a term using a type "cq:Page" it essentially searches based on indexes built for cqPageLucene you can check the configurations of these under "/oak:index/cqPageLucene"

 

Your observation is correct that when you use the type cq:Page you are getting results for node till "propNode" (level 4), and when you remove it you get it to subNode level as well. The reasoning is that:

  • When you remove the type parameter "cq:Page" it essentially then traverses the entire hierarchy instead of getting the results based of indexes (performance will be poor as the search set increases)
  • However when you add the type parameter "cq:Page" then the index depth is driven by aggregation rules defined under the index configuration: "/oak:index/cqPageLucene/aggregates/cq:PageContent" which is by default up-to 4 levels (refer screenshot below):

DivrajSingh_0-1620736034378.png

 

To understand more about index aggregation configurations in this documentation

 

I hope this answers your query,