Expand my Community achievements bar.

SOLVED

Fetch pages based on date

Avatar

Level 5

I am trying to build a search component which involves search using date also. 

Developed a query like this with help from this forum

path=/content/blog
type=cq:Page
group.p.or=true
group.1_fulltext=fullTextSearchTerm
group.1_fulltext.relPath=jcr:content/@cq:tags
group.2_fulltext=2015-05-21
group.2_fulltext.relPath=jcr:content
group.3_fulltext=2015-05-21
group.3_fulltext.relPath=jcr:content/@cq:lastModified
orderby=@jcr:content/cq:lastModified
orderby.sort=desc

Date feature is not working. Will the query be different for Date ? I am new to this topic. Request your help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

 You are showing Query Builder API. See here for more information about how to use this in a tool and more syntax examples. 

http://cq-ops.tumblr.com/post/23543240500/how-to-use-cqs-query-debugger-tool

You can also use JCR SQL to query dates.

Here is more information on using JCR SQL to query dates:

http://stackoverflow.com/questions/15117075/jcr-sql2-query-comparing-dates

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

 You are showing Query Builder API. See here for more information about how to use this in a tool and more syntax examples. 

http://cq-ops.tumblr.com/post/23543240500/how-to-use-cqs-query-debugger-tool

You can also use JCR SQL to query dates.

Here is more information on using JCR SQL to query dates:

http://stackoverflow.com/questions/15117075/jcr-sql2-query-comparing-dates