search component | Community
Skip to main content
Jai1122
New Participant
October 16, 2015
Solved

search component

  • October 16, 2015
  • 3 replies
  • 1564 views

My requirement is to create a blog which also includes creating a search component that is used to search by author, date and category. The OOTB component (/libs/social/blog/components/search) is not helping for date search. I checked the code for it the form action points to the same page. I could not understand how the code works. On clicking search the url changes to

    localhost:4502/cf#/content/Jai/blog.html?query={search-string}&blog=search&_charset_=UTF-8

Kindly let me know which script/bundle/code gets executed when the url gets appended with search parameters

I am using Adobe CQ5.6.1. Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

See the search component discussion in this topic:

http://docs.adobe.com/docs/en/aem/6-0/develop/the-basics/website.html

There is a detailed discussion about creating a Search component. Once you understand that  - you can extend it to meet your requirements. 

3 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

See the search component discussion in this topic:

http://docs.adobe.com/docs/en/aem/6-0/develop/the-basics/website.html

There is a detailed discussion about creating a Search component. Once you understand that  - you can extend it to meet your requirements. 

WhoaShekhar
New Participant
October 16, 2015
Jai1122
Jai1122Author
New Participant
October 16, 2015

Thanks for the response. I some how figuredout how the OOTB search component works. 

The xpathquery formed is  /jcr:root/content/farmers-blog/*[not(fn:name() = 'unlisted')]/*/element(*, cq:Page)[jcr:contains(., '{searchquery1}') or jcr:contains(., '{searchquery2}')]

 

But this does not work for date. I could not make a search using date. Should there be any changes made in xpathquery formed??