Headings in searchable elements

More of a request really. The list of searchable Attributes is good. I’m currently using the title of the page as the main searchable element which brings up some interesting results, (maybe that’s a reflection of my client’s page titles)

However, when previously using Algolia I often found that the headings (in particular heading[0] (or the H1 was one of the best searchable elements. Is there any way to expand the default search criteria?

Hi, thank you for the feedback!
Headings are something we thought about adding, but we are not completely convinced for now, as on many sites, the first heading is often the same than the page’s title. Actually if I understand correctly what you say:

(maybe that’s a reflection of my client’s page titles)

Does it means that you’ve observed that yourself too? (in which case, the title is already a searchable attribute)

But we will try to do a new pass on the extraction in the coming months, by reviewing actual implementations of the Netlify plugin, so the feedback is noted! :slight_smile:

Well for example a clients site might have the page title of…
Toy Story 3 || MyMovieSite.com

You don’t necessarily want the || MyMovieSeite.com part to be searchable.

Where as the H1 of the page might just be Toy Story 3

I see. We have a small cleanup function for title, that handle a common pattern: for the following title: Page title | MyWebsite. We remove | MyWebsite if the website domain contains mywebsite.
I works in many cases (e.g. Netlify, Kubernetes, our own website, …) but not all of course, as the domain needs to match.
It’s difficult because every website is different (that’s why we have a Custom Crawler in our products :slightly_smiling_face:) and we try to do something generic here, but thanks again for the feedback.

Until we improve that, an alternative could be to set the title without any suffix in the og:title meta tag. We take it in priority.