Posted by Bradley Kelly on

Hi, I like the new custom site search where you can just dearch sertain parts of the ewebsite, however, could we have the option to be able to only search the titles of the pages, as when I search for a certain page, lots of other pages appear as rhey also have that word uin the webspage, but I ionly want it to be able to search for the pages that only have the search to index word that only in the title, not in the webpage ocerall if that is possible?

 

For example, in the screenshot, I only want the first page to appear in the search page, not the others, as they aren't revulant to the search querie. They are only there as there is a link to that page on the other pages that is still being indexed. 

Posted by GrahamShort on

Bradley, is there documentation on the new custom site search as I couldn't find it and am interested in this myself.

Regards

    Graham

Posted by Bradley Kelly on

I'm not sure if there is a documentation but you can add it to your website by clicking on Add Includelet and selecting Custom Site Search in the Layout tab for your chosen page. 

Posted by GrahamShort on

Brilliant. Will give it a try. 

Posted by Joe Oldak on

You're right, Custom Site Search is kinda new and hasn't made it into the documentation. The general idea is that it adds a search box to your site, and you can configure it to search only within certain content sections.

https://www.bromleywell.org.uk/ have used it on their homepage to create a search box that only returns results from their Advice and Services sections, and not from all their news and events etc.

There is however no way to make search only match against page titles. Internally the titles, keywords, description, and content are all indexed together and can't be separated out.

However, note that title, description, and keywords are given a greater weight in the scoring algorithm, so pages that have matches here will be returned higher in the search results.

Thanks

Joe