Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Fetch pages based on date

Avatar

Avatar
Validate 25
Level 3
Jai1122
Level 3

Likes

21 likes

Total Posts

127 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
Jai1122
Level 3

Likes

21 likes

Total Posts

127 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
Jai1122
Level 3

15-10-2015

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

15-10-2015

 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

Answers (0)