Skip to content

Instantly share code, notes, and snippets.

@remd
Created January 28, 2014 02:41
Show Gist options
  • Save remd/8661440 to your computer and use it in GitHub Desktop.
Save remd/8661440 to your computer and use it in GitHub Desktop.
override def query(q: String) = {
val responses = clients.map {client => client.query(q)}
val matches = responses.map {response => JSON.parseFull(response.get().getContent().toString("UTF-8")) match {
case Some(obj: Map[String, List[Match]]) => obj("results")
}}
querySuccessResponse(matches)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment