Highlighted

AEM6.3 - website search

elizabethp60981

03-05-2018

Hi,

We have to develop a simple content search on our website.

I was looking for options to how develop this, and I found this documentation to use the foundations search: Create a Fully-Featured Website (JSP)

The problem is that this solutions does not work on 6.3 version.

And I was looking about to use the Quick Search from wcm/core/components (Quick Search Component ), and I saw that it uses query builder.

The search on our site will bring just until 10 results of general content, so it is important that be the 10 most relevants.

It seems that query builder brings random results for the term that I am searching.

Query builder is recomended to use as a search engine?

What is the best approach to do a simple search with relevant content?

Thank you very much in advance!

Replies

Highlighted

Rima_Mittal

03-05-2018

Hi,

Please refer the sample project at aem-guides/simple-search-guide at master · Adobe-Marketing-Cloud/aem-guides · GitHub for a complete reference on how to implement search on your AEM website. Also, refer the documentation at Simple search implementation guide

To give an overview, you will have to use the Query Builder API to implement your search functionality. Also, you would need to create proper Indexes in the JCR.

Hope this helps!

Highlighted

MarkETDA

07-09-2018

Rather than start a new question, perhaps those of you who've read this can give me a simple reply. I want to add on-site search to my AEM site. Where does the search module get its results from? Do I just trust what's on the pages, do I need to add keywords or tags to the header or each page, or is there something I need to do so when a query is entered, results will be returned?

Any help would be very much appreciated! Thank you!

Highlighted

Jörg_Hoh

Employee

09-09-2018

Although it's documented, I would not use the AEM Querybuilder (which is building on top of the JCR queries) to build a site search. Mostly because the JCR query language makes it hard to implement features you would expect from a site search. On top of that. it will always return nodes, not pages. On first sight that's not a problem, but it can turn into one when you think of a search term, you have in the page footer (and which is common for many/all of your pages and which you inherit down the pages). Where do you find this text? Typically at a single node and you might be even able to render this as page. But if that term is stored in /conf (because it is managed as configuration), what's your search result then?

Content architecture != information architecture, thus repository search != site search.

some reading:

Creating the content architecture with AEM | Things on a content management system

Information architecture & content architecture | Things on a content management system

(and more to come)

if you want to implement site search, I would use a dedicated search engine (e.g. solr) and feed content into (or let it crawl your site). That's much more accurate reflecting the content of your pages, plus these search engines offer superior site search features ootb.

Jörg