Expand my Community achievements bar.

SOLVED

search component

Avatar

Level 5

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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. 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

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. 

Avatar

Level 5

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??