Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Last active November 13, 2019 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcoyne/1888a5fb47b8b9a83052f3bcec5ca419 to your computer and use it in GitHub Desktop.
Save jcoyne/1888a5fb47b8b9a83052f3bcec5ca419 to your computer and use it in GitHub Desktop.
Search for Druids
filter = 'wf_wps_ssim:"accessionWF:sdr-ingest-transfer:error"'
search = Blacklight.default_index.search(fq: filter, fl: 'id', rows: 10_000)
druids = search.response['docs'].map {|d| d['id']}
@jcoyne
Copy link
Author

jcoyne commented Nov 13, 2019

./bin/rails runner -e production "puts Blacklight.default_index.search(fq: 'wf_wps_ssim:\"accessionWF:sdr-ingest-transfer:error\"', fl: 'id', rows: 10_000).response['docs'].map {|d| d['id']}" > druids.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment