Hi,
I am implementing a search with query builder. I am retrieving content from the last 12 months, but I wish I could group the results per month.
Looking on the internet I could just find grouping to combine more than one search criteria.
Is it posible to group the results by month with query builder?
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
It is not possible to group on the month basis.
We would need to execute the query for each months daterange.
Once you have the details of each month, collect the required details in a proper data structure.
Then use this data structure to display/consume results as needed
I don't think you can do that, but you can sort it in asc or dsc order. I would suggest you to write a custom code to group your results month wise. After fetching the results of your query, using your back-end code , group them however you want.
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content]) and s.[cq:lastModified] >= '2013-06-11T14:06:50.197+01:00' and s.[cq:lastModified] >= '2014-06-11T14:06:50.197+01:00'
It is not possible to group on the month basis.
We would need to execute the query for each months daterange.
Once you have the details of each month, collect the required details in a proper data structure.
Then use this data structure to display/consume results as needed
Views
Likes
Replies