Add deployment command documentation for Mexico collection publication year update#24
Draft
Add deployment command documentation for Mexico collection publication year update#24
Conversation
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix publication year filter values in SciELO Analytics
Add deployment command documentation for Mexico collection publication year update
Oct 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Mexico collection in SciELO Analytics is displaying incorrect publication years in the document filters, showing impossible future dates like 2250, 2026, and 2027. As shown in the screenshot, the "Publishing year" filter displays a period range from 2012 to 2250, indicating data inconsistencies.
While these incorrect publication years have already been corrected in the ArticleMeta database, the PublicationStats ElasticSearch index has not been updated to reflect these changes. This causes the Analytics interface to continue showing outdated and incorrect data.
Affected Articles
Several articles were identified with incorrect publication years:
Solution
This PR provides comprehensive deployment documentation with the exact command needed to update the PublicationStats ElasticSearch index from the corrected ArticleMeta data.
Command for Deployment Team
The main command to execute on the production server:
Parameters:
--collection mex- Targets the Mexico collection specifically--doc_type article- Updates article documents (where publication_year field is stored)--differential- Efficient mode that compares ArticleMeta and PublicationStats indexes, updating only the documents with differencesAlternative Options
For scenarios requiring additional cleanup:
Files Added
Verification
After executing the command, the deployment team should verify:
Technical Details
The
publicationstats_loaddatacommand is a console script entry point (defined insetup.py) that executes themain()function inprocessing/loaddata.py. The differential mode works by:This approach is efficient and safe, minimizing the risk of data loss while ensuring the ElasticSearch index reflects the current state of ArticleMeta.
Original prompt
This section details on the original issue you should resolve
<issue_title>Filtro de ano de publicação com valores errados - Coleção México</issue_title>
<issue_description>### Descrição do problema
Os representantes da Coleção relataram haver problema nos valores apresentados no filtro "ano de publicação" para alguns periódicos. Alguns documentos desses periódicos estavam com o ano de publicação errado, e isso já foi corrigido no ArticleMeta. Porém, no SciELO Analytics, esse problema persiste (vide figura a seguir).
Em resumo, constatou-se que é necessário executar o script loaddata.py, que está disponível em processing/loaddata.py na aplicação PublicationStats, para atualizar o índice que povoa os filtros do Analytics. Algo como
publicationstats_loaddatana linha de comando do servidor da aplicação deverá resolver o problema.Passos para reproduzir o problema
Anexos
Artigos e periódicos afetados
Procedimentos já analisados
publicationstats_loaddatana linha de comando do servidor desta aplicação deveria resolver o problema.Ambiente utilizado
N/A</issue_description>
<agent_instructions>considere a descrição do issue, considere mex é a coleção e que o script é def main():
Fixes #23
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.