Last active
December 15, 2015 10:38
-
-
Save tomgullo/5246656 to your computer and use it in GitHub Desktop.
json_from_solr.groovy
This file contains 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
def data = new URL(s).text | |
json = slurper.parseText(data) | |
json.response.docs | |
json.highlighting | |
json.facet_counts | |
json.responseHeader.QTime | |
json.response.numFound | |
for (e in docs) { | |
String id_s = e.id.toString() | |
if (id_s) { | |
if (highlighting[id_s].field_with_text) { | |
e.field_with_text = highlighting[id_s].field_with_text.join("") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment