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
Solved! Go to Solution.
Views
Replies
Total Likes
Same issue has a solution here https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/query-builder-with-multipl... maybe you can check once.
Hi @AkshayWa2 ,
Could you try the following query ? Highlighted part has been changed.
fulltext=random text
group.1_path=/content/us/en
group.2_path=/content/ca/en
group.p.or=true
orderby=@jcr:score
orderby.desc=true
Thanks,
Somen
Thanks @somen-sarkar for quick response, it sorting but still in group, first group of result is from /us/en since our 1st path in query is /us/en and then second group is considered which is /ca/en which is 2nd path in our query and that is sorted separately
0: /content/us/en/page1.html jcr:score = 1.50
1: /content/ca/en/page3.html jcr:score = 1.20
2: /content/ca/en/page2.html jcr:score = 2.50
Same issue has a solution here https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/query-builder-with-multipl... maybe you can check once.
@AkshayWa2 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies