Skip to content

Conversation

@ihorsokhanexoft
Copy link
Contributor

@ihorsokhanexoft ihorsokhanexoft commented Jan 19, 2026

Ticket

https://openscience.atlassian.net/browse/ENG-10073?atlOrigin=eyJpIjoiNWIyN2M2NDliYjJmNDc1ZjhhZjRjYTQ0NjQ1ZDAyNDIiLCJwIjoiaiJ9

Purpose

Methods that add/update/delete institution affiliation for some user does not update share to make the user searchable by affiliation filter

Changes

Added share update in some key methods
Added a management command to reindex specific users when needed

Comment on lines 40 to 47
if guids:
users = OSFUser.objects.filter(guids___id__in=guids)
else:
users = OSFUser.objects.all()

for user in users:
logger.info(f'Reindexing {user._id}...')
user.update_search()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We probably want to do this in batches so that we don't overwhelm SHARE.

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