Results are grouped based on multiple paths used within AEM Query Builder
When we do query search, results are grouped based on paths.
For example, if we have queried for paths /content/us/en & /content/ca/en , then results will have group of pages from /us/en and after that it will have group of pages from /ca/en. Even if we try to sort orderby=@jcr:score , sorting is done for 1st set of pages from /us/en and after that it sorts pages from /ca/en, ideally it should be sorting for entire set of result.
Sample query:
fulltext=random text
group.1_path=/content/us/en
group.2_path=/content/ca/en
group.p.or=true
orderby=@jcr:score
orderby.sort=desc
Result :
0: /content/us/en/page1.html jcr:score = 1.50
1: /content/ca/en/page2.html jcr:score = 2.50
2: /content/ca/en/page3.html jcr:score = 1.20
Ideally it should be somewhat like:
0: /content/ca/en/page2.html jcr:score = 2.50
1: /content/us/en/page1.html jcr:score = 1.50
2: /content/ca/en/page3.html jcr:score = 1.20