alphagov/whitehall — pull request #43 by floehopper (2012-10-02 17:09:58+00:00)
Title: Add breadcrumb metadata to search index for detailed guidance.

*** Do not merge until the new version of rummageable & rummager are incorporated (see below) ***

I would have preferred to use a single key to hold all this metadata,
but the strictures of Rummageable (client-side) and Rummager
(server-side) validation means that this would have been very awkward.
So for now it's more straightforward to re-use the "section" &
"subsection" keys used by mainstream and to introduce a new
"subsubsection" key.

This data is obtained by parsing the detailed guide's mainstream
category parent_tag and using its slug. The former in particular seems
rather brittle, but it seems like the least worst option at the moment.

Note that this change is dependent on https://github.com/alphagov/rummageable/pull/4 which is in turn dependent on https://github.com/alphagov/rummager/pull/33.

Also note that this only adds the breadcrumb metadata to the search index - it does not consume it anywhere. Having said that the motivation behind the change is to use this metadata to show individual breadcrumbs alongside each detailed guidance search result.

See https://www.pivotaltracker.com/story/show/36615073 for details.