Skip to content

Instantly share code, notes, and snippets.

@indrode
Last active August 29, 2015 14:03
Show Gist options
  • Save indrode/9859f4617149cedd099c to your computer and use it in GitHub Desktop.
Save indrode/9859f4617149cedd099c to your computer and use it in GitHub Desktop.
Remove individual records from ES index
# copy zebralution_track_ids.txt to the current vsvn015 workspace
# e.g. vsvn015:/opt/simfy/app/simfy_production/releases/20140625084549
# then, on vsvn015 Rails console
ContentTools
process_ids_from_file('zebralution_track_ids.txt') do |id|
command = "curl -XDELETE 'http://localhost:9200/tracks_production/zebralution_track/#{id}'"
system(command)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment