Skip to content

Sch 2034 update search api rake tasks that reference government index#3597

Merged
emmalowe merged 7 commits intomainfrom
SCH-2034-Update-search-api-rake-tasks-that-reference-government-index
Apr 29, 2026
Merged

Sch 2034 update search api rake tasks that reference government index#3597
emmalowe merged 7 commits intomainfrom
SCH-2034-Update-search-api-rake-tasks-that-reference-government-index

Conversation

@emmalowe
Copy link
Copy Markdown
Contributor

@emmalowe emmalowe commented Apr 24, 2026

Remove references to government index in search-api rake tasks where relevant, in preparation of retiring the government index.

Jira ticket: https://gov-uk.atlassian.net/browse/SCH-2034

Comment thread lib/tasks/duplicates.rake Outdated
@emmalowe emmalowe marked this pull request as ready for review April 24, 2026 11:44
Copy link
Copy Markdown
Contributor

@koetsier koetsier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

Comment thread lib/tasks/duplicates.rake Outdated
The govuk index will be the only relevant index to run
these rake tasks on, once the government index has been
retired (this is in progress).

The duplicates are located by content_id, which only appears
as a field in the content indexes and not the auxiliary
indexes.
@emmalowe emmalowe force-pushed the SCH-2034-Update-search-api-rake-tasks-that-reference-government-index branch from 40569d1 to fe167bc Compare April 28, 2026 15:45
This code can be simplified now that we're only using
the duplicates rake tasks on the govuk index.
This has been broken since 2020, so it seems unlikely that
it will be missed. We can get the results in a json format
from search API anyway.

See PR that broke the task:
#2062
The govuk index will be the only relevant index to run
this rake task on, once the government index has been
retired (this is in progress). That's because the format
field only appears in the content indexes, not the auxiliary
indexes.
The govuk index will be the only relevant index to run
this rake task on, once the government index has been
retired (this is in progress). That's because the title and
description fields only appear in the content indexes,
not the auxiliary indexes.
The govuk index will be the only relevant index to run
this rake task on, once the government index has been
retired (this is in progress). That's because the
content_store_document_type fields only appears in the content
indexes, not the auxiliary indexes.
All documents have now been migrated to the govuk index,
so we can remove references to other indices.
@emmalowe emmalowe force-pushed the SCH-2034-Update-search-api-rake-tasks-that-reference-government-index branch from fe167bc to 545abd6 Compare April 28, 2026 16:06
@emmalowe emmalowe requested a review from koetsier April 28, 2026 16:16
@emmalowe
Copy link
Copy Markdown
Contributor Author

@koetsier I've refactored the duplicates code - do you mind reviewing this again please?

@emmalowe emmalowe merged commit ae8a7b0 into main Apr 29, 2026
7 checks passed
@emmalowe emmalowe deleted the SCH-2034-Update-search-api-rake-tasks-that-reference-government-index branch April 29, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants