Skip to content

Instantly share code, notes, and snippets.

@mnylen
Created May 14, 2012 09:44
Show Gist options
  • Save mnylen/2692983 to your computer and use it in GitHub Desktop.
Save mnylen/2692983 to your computer and use it in GitHub Desktop.
val resp = client
.prepareSearch(IndexName)
.setTypes(TypeName)
.setQuery(qb)
.addSort("id", SortOrder.ASC)
.execute()
.actionGet()
resp.getHits.getHits.map(hit =>
parse(hit.sourceAsString()).asInstanceOf[JObject]
).toList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment