Permalink
Browse files

Fix elasticBoost generation

The extra ()'s cause problems if using a single field for sort order
  • Loading branch information...
1 parent 4630f5a commit 3e1eb024d5f8db106eb7e9ecb210930592087dde Holden Karau committed Apr 30, 2012
View
@@ -1,6 +1,6 @@
name := "slashem"
-version := "0.9.10a"
+version := "0.9.10b"
organization := "com.foursquare"
@@ -224,7 +224,7 @@ object Ast {
fieldName
}
def elasticBoost(): Pair[List[String],String] = {
- Pair(Nil,"(doc['" + fieldName + "'].value)")
+ Pair(Nil,"doc['" + fieldName + "'].value")
}
}
@@ -72,6 +72,13 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
@Test
+ def simpleOrderTest {
+ val fullQuery = ESimplePanda.where(_.name contains "lol")
+ .limit(5).orderDesc(_.followers)
+ val r = fullQuery fetch()
+ }
+
+ @Test
def testEmptySearch {
try {
val r = ESimplePanda where (_.name eqs "lolsdonotinsertsomethingwiththisinit") fetch()

0 comments on commit 3e1eb02

Please sign in to comment.