Long pages including headings with anchors

Hi. A newbie question here - apologies if this is better dealt with elsewhere. I’m not clear on whether all the wider Algolia docs apply to installations of the netlify-integration. I get the impression from docs like https://github.com/algolia/algoliasearch-netlify/blob/master/docs/Extraction.md that I may have a little less control over things here.

I’m building a Hugo site for hosting documents related to insurance, e.g. Policy Disclosure Statements. These pages are long and have a clear heirarchy composed of different headings with IDs. The guide https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/indexing-long-documents/ seems appropriate for this sort of content. Can I do this while using the netflify integration?

In the end it would be good to:

  1. have search results link to the relevant heading (anchor)
  2. split the longer page into smaller chunks

I could split these large documents into smaller documents on the content-side, but thought I’d check first what I can do on the Algolia side.

Thanks.

Hello @dylanfm,

Thanks for reaching out with a perfectly clear question.

We are currently working on a “templating” parameter that would allow Netlify user to choose between: normal extraction and hierarchical extraction.
So your question is perfectly timed.

The hierarchical extraction will produce one record per heading (h1, h2, h3, h4, etc…) and that will allow the search UI to display on point directly to the correct section.
The only drawback is the higher number of records needed.

This feature is currently in review so you can expect a release very soon.
In the mean time, please don’t hesitate to reach out in private if you are interested and would like us to understand more your use case. support@algolia.com

Best Regards

1 Like

Thank you Samuel. That sounds promising. I think I will be splitting the long pages up into smaller sections anyway, but this will still be a valuable feature for us. Thanks.

Hi @samuel.bodin. Just a quick word that I’ve just setup the new heirarchical template config and it appears to be working well. Thanks.

2 Likes

Thanks @dylanfm
glad we could help you achieve what you wanted :slight_smile: