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!
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.
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.