How to do a search by date query on cq pages | AEM Community Blog Seeding | Adobe Higher Education
Skip to main content
kautuk_sahni
Community Manager
Community Manager
May 27, 2020

How to do a search by date query on cq pages | AEM Community Blog Seeding

  • May 27, 2020
  • 0 risposte
  • 1626 visualizzazioni

BlogImage.jpg

How to do a search by date query on cq pages by howtoaem Blog

Abstract

How to do a search by date query on cq pages
I am trying to create a blog in cq5. The OOTB search component in blog is not supporting search by date feature. I tried to override it, but could not find the correct query to fetch the blogs created on a particular date. Seems the only functions supported are >,>=,<,<=.

Please help me in finding a query (preferabbly xpath) to fetch a page created on a particular date (cq:lastModified).

Best How To:
There are some functions in XPath like contains or not. There is also one for date fields. Here an example for anything that was just modified in the content tree:

/jcr:root/content//*[@cq:lastModified >= xs:dateTime('2015-05-29T08:44:56.280Z')]

Read Full Blog

How to do a search by date query on cq pages

Q&A

Please use this thread to ask the related questions.

Questo argomento è stato chiuso alle risposte.