Skip to content

Commit

Permalink
Fix elasticBoost generation
Browse files Browse the repository at this point in the history
The extra ()'s cause problems if using a single field for sort order
  • Loading branch information
Holden Karau committed Apr 30, 2012
1 parent 4630f5a commit 3e1eb02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
@@ -1,6 +1,6 @@
name := "slashem" name := "slashem"


version := "0.9.10a" version := "0.9.10b"


organization := "com.foursquare" organization := "com.foursquare"


Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/foursquare/slashem/Ast.scala
Expand Up @@ -224,7 +224,7 @@ object Ast {
fieldName fieldName
} }
def elasticBoost(): Pair[List[String],String] = { def elasticBoost(): Pair[List[String],String] = {
Pair(Nil,"(doc['" + fieldName + "'].value)") Pair(Nil,"doc['" + fieldName + "'].value")
} }
} }


Expand Down
7 changes: 7 additions & 0 deletions src/test/scala/com/foursquare/slashem/ElasticQueryTest.scala
Expand Up @@ -71,6 +71,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 @Test
def testEmptySearch { def testEmptySearch {
try { try {
Expand Down

0 comments on commit 3e1eb02

Please sign in to comment.