What
Remove the slug field from document parts once all documents have had their link field populated in elasticsearch.
Why
A Search API document contains an array of parts which are built from information stored in the attachments key of details fetched from Publishing API. Previously, the parts contained only three attributes: slug, title, body. PR (#3271) added a link field to parts.
This new field is the fully qualified path for the part, which was necessary to deal with a bug where Finder Frontend lacked the information to correctly build links for parts where they have urls with an additional path segment. For example, consultation outcomes sit under <parent>/outcome/<part>.
The known document types that presented this issue, consultations and calls for evidence with outcomes, have been bulk republished in order to populate this field in elasticsearch.
Search API now tries to use link where it is populated and falls back to slug where it is not.
The slug field is now deprecated (#3325). Eventually slug should be entirely removed, but only after we are confident every document with either parts or attachments has had the link field populated.
What
Remove the
slugfield from document parts once all documents have had theirlinkfield populated in elasticsearch.Why
A Search API document contains an array of parts which are built from information stored in the attachments key of details fetched from Publishing API. Previously, the parts contained only three attributes: slug, title, body. PR (#3271) added a
linkfield toparts.This new field is the fully qualified path for the part, which was necessary to deal with a bug where Finder Frontend lacked the information to correctly build links for parts where they have urls with an additional path segment. For example, consultation outcomes sit under
<parent>/outcome/<part>.The known document types that presented this issue, consultations and calls for evidence with outcomes, have been bulk republished in order to populate this field in elasticsearch.
Search API now tries to use
linkwhere it is populated and falls back toslugwhere it is not.The
slugfield is now deprecated (#3325). Eventuallyslugshould be entirely removed, but only after we are confident every document with either parts or attachments has had thelinkfield populated.