Skip to content

Commit

Permalink
Fixed feedback from pullrequest, final commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalix committed Mar 14, 2012
1 parent 0f83199 commit 6c43037
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/scala/com/foursquare/slashem/Schema.scala
Expand Up @@ -321,8 +321,8 @@ trait SolrMeta[T <: Record[T]] extends SlashemMeta[T] {
val facetCounts = rsr.facetCounts

val facets: Map[String,Map[String,Int]] = if (facetCounts != null) {
facetCounts.facetFields.asScala.map(magic => {
(magic._1, parseFacetCounts(magic._2.asScala.toList).toMap)
facetCounts.facetFields.asScala.map(ffCountPair => {
(ffCountPair._1, parseFacetCounts(ffCountPair._2.asScala.toList).toMap)
}).toMap
} else {
Map.empty
Expand Down Expand Up @@ -368,7 +368,7 @@ trait SolrMeta[T <: Record[T]] extends SlashemMeta[T] {

}

/** Provides simple logging/timing */
/** Logging and Timing solr trait */
trait SolrQueryLogger {
def log(name: String, msg: String, time: Long)

Expand Down Expand Up @@ -577,7 +577,6 @@ trait ElasticSchema[M <: Record[M]] extends SlashemSchema[M] {
val q = new TermsFacetBuilder(name).field(name)
facetLimit match {
case Some(c) => {
println("using size of "+c)
q.size(c)
}
case _ => q
Expand Down Expand Up @@ -833,9 +832,10 @@ class SlashemLongListField[T <: Record[T]](owner: T) extends LongListField[T](ow
override def valueBoxFromAny(a: Any) = {
try {
a match {
case long: Long => Full(List(long))
case strArr: Array[Long] => Full(strArr.toList)
case intArr: Array[Int] => Full(intArr.toList.map(int => int.toLong))
case long: Long => Full(List(long))
case strArr: Array[Long] => Full(strArr.toList)
case intArr: Array[Int] => Full(intArr.toList.map(int => int.toLong))
case str: String => Full(str.split(" ").map(s => s.toLong).toList)
case _ => Empty
}
} catch {
Expand Down

0 comments on commit 6c43037

Please sign in to comment.