I am grouping 2 paths for a query, and the results that come back always display results from the first path first, then followed by the second path, regardless of the jcr:score.
My goal is to have combined results, sorted by jcr:score.
Results always come back in this way, with results ordered by jcr:score within the path. Can the results come back so the results are only based on score?
Results:
path1 score: 10
path1 score: 5
path1 score: 1
path2 score: 9
path2 score: 6
path2 score: 3
path2 score 1
Desired:
path1 score: 10
path2 score: 9
path2 score: 6
path1 score: 5
path2: score: 3
path1: score 1
path2: score 1
This is my actual query:
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @HN_Doug
Can you remove the "group.p.or=true" parameter and add the "orderby=@jcr:score" parameter outside of the grouping block and verify
fulltext=searchterm
group.0_path=/content/section1
group.0_path.self=true
group.1_path=/content/section2
group.1_path.self=true
orderby=@jcr:score
orderby.sort=desc
property=jcr:content/excludeFromSearch
property.operation=not
2_property=jcr:content/cq:redirectTarget
2_property.operation=not
type=cq:Page
p.limit=-1
p.excerpt=true
Hi @HN_Doug
Can you remove the "group.p.or=true" parameter and add the "orderby=@jcr:score" parameter outside of the grouping block and verify
fulltext=searchterm
group.0_path=/content/section1
group.0_path.self=true
group.1_path=/content/section2
group.1_path.self=true
orderby=@jcr:score
orderby.sort=desc
property=jcr:content/excludeFromSearch
property.operation=not
2_property=jcr:content/cq:redirectTarget
2_property.operation=not
type=cq:Page
p.limit=-1
p.excerpt=true
without group.p.or=true, I had zero results. adding that back in fixed it. Otherwise, it's working as needed. Thank you.
Views
Replies
Total Likes
Using that same query you provided, how could I override the cq:redirectTarget NOT condition if another, new page property was checked?
For example, if I add a property named jcr:content/featuredSearch that could be checked:
If jcr:content/featuredSearch is checked, add the page to the results even if it has something in jcr:content/cq:redirectTarget
Views
Replies
Total Likes