Permalink
Browse files

Slight cleanup

  • Loading branch information...
1 parent 3d3138d commit 188890e00cfe1509e117b36bc5c38ae970cb396c Holden Karau committed Apr 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/scala/com/foursquare/slashem/Schema.scala
@@ -530,7 +530,8 @@ trait ElasticSchema[M <: Record[M]] extends SlashemSchema[M] {
response: SearchResponse): SearchResults[M, Y] = {
val time = response.tookInMillis()
val hitCount = response.getHits().totalHits().toInt
- val docs: Array[(Map[String,Any], Option[Map[String,java.util.ArrayList[String]]])] = response.getHits().getHits().map(doc => {
+ val esHits = response.getHits().getHits()
+ val docs: Array[(Map[String,Any], Option[Map[String,java.util.ArrayList[String]]])] = esHits.map(doc => {
val m = doc.sourceAsMap()
val annotedMap = (m.asScala ++ List("score" -> doc.score().toDouble)).toMap
val hlf = doc.getHighlightFields()

0 comments on commit 188890e

Please sign in to comment.