Last March, I reset my C++ track. I realized afterwards that my previously-submitted solutions are still listed on my profile (see screenshot). When I click on one, I am redirected to a solution by the ExercismGhost. (Strangely, in the track filter dropdown, it says I only have one submitted solution.)
@ErikSchierboom This should get you a list of all the IDs of things that we probably want to resync:
Solution.connection.select_all('SELECT id FROM solutions where unique_key <> CONCAT(user_id, ":", exercise_id)')
Or you could just remove all solutions where user_id: 720036
from the index. (User::GHOST_USER_ID
is the constant for that as a final FYI)
This is probably easier. I’ll try that.
I’ve just ran:
Exercism.opensearch_client.delete_by_query(index: Solution::OPENSEARCH_INDEX, body: {
query: {
match: {
'user.id': User::GHOST_USER_ID
}
}
})
408 solutions were deleted:
{"took"=>136,
"timed_out"=>false,
"total"=>408,
"deleted"=>408,
"batches"=>1,
"version_conflicts"=>0,
"noops"=>0,
"retries"=>{"bulk"=>0, "search"=>0},
"throttled_millis"=>0,
"requests_per_second"=>-1.0,
"throttled_until_millis"=>0,
"failures"=>[]}
Great work