New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make policies indexable #1053
Make policies indexable #1053
Conversation
781b363
to
4ed4f93
Compare
I've picked this PR up from Rosa, and I've moved the |
@@ -62,6 +66,12 @@ def content_ids(collection) | |||
values_from_collection(expanded_links_item(collection), "content_id") | |||
end | |||
|
|||
def slugs(type, path_prefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a nice cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thought would be to change to to match: https://github.com/alphagov/rummager/pull/1053/files#diff-506cd05cce4cbe451fda1d266331a7bcR156
.gusb(%r{^/....
That way it will only match the prefix. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made it more consistent. 👍 What do you think?
@@ -26,6 +25,16 @@ def initialize(payload) | |||
@payload = payload | |||
end | |||
|
|||
def description | |||
if format == "policy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE FOR THIS PR, but if we have time at the end of the quarter, it would be nice to try and remove the description where it is just a duplicate of content in the indexable_content
field and see if it effect the score in any way.
That would enable us to remove this mess, plus some indexable content hacks.
4ed4f93
to
a92624f
Compare
- Maps `policy_groups`, `people`, `description` and `slug` fields. - This is to set up the policy format to be migrated to the govuk search index.
a92624f
to
ec0ff4b
Compare
Trello
policy_groups
,people
,description
andslug
fields.