I have query builder parameter as
path=/content/sample/en
type=cq:Page
orderby=@jcr:content/jcr:title
orderby.sort=asc
p.limit=-1
Now I have two Pages as
/content/sample/en/sample-page (jcr:title -> Sample Page)
/content/sample/en/1-page (jcr:title -> 1 Page)
/content/sample/en/3 (jcr:title -> 3)
/content/sample/en/3-page (jcr:title -> 3 Page)
Ideally I should get numeric at the top but I am getting order as
/content/sample/en/3 (jcr:title -> 3)
/content/sample/en/3-page (jcr:title -> 3 Page)
/content/sample/en/sample-page (jcr:title -> Sample Page)
/content/sample/en/1-page (jcr:title -> 1 Page)
This is incorrect am I doing something wrong here need guidance from the community
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
hi @RohanRa6,
I've created pages with the same structure as yours:
and query results are exactly as expected:
You can see on the left a slightly changed query hitting on cq:PaceContent as a reference for comparison (non-suggested though because OOTB there is no index defined already).
The results are as expected so I'm guessing that your sample-page has a number at the beginning of the jcr:title property?
If not please have a look at General Debugging Recommendations so you can obtain more clarity about the query with Explain Query
I've just noticed the same ordering as you with a simple space after jcr:title: not working vs working
You can see the space char highlighted in blu and pages are sorted by creation date:
Views
Like
Replies
Views
Like
Replies