Permalink
Browse files

Merge pull request #27 from holdenk/master

Fix issue with orderBy queries & ES
  • Loading branch information...
2 parents 2899a27 + 2017f13 commit e46a22b23fcc4e2025e91edf365fae7fa2baca97 @adamalix adamalix committed May 1, 2012
View
4 build.sbt
@@ -1,6 +1,6 @@
name := "slashem"
-version := "0.9.10"
+version := "0.9.10b"
organization := "com.foursquare"
@@ -27,7 +27,7 @@ libraryDependencies <++= (scalaVersion) { scalaVersion =>
"junit" % "junit" % "[4.8.2,)" % "test",
"com.novocode" % "junit-interface" % "[0.7,)" % "test" ,
"org.scala-tools.testing" %% "specs" % specsVersion % "test",
- "org.elasticsearch" % "elasticsearch" % "0.19.0" % "compile" exclude("log4j", "log4j") exclude("com.sun.jmx","jmxri") exclude("com.sun.jdmk","jmxtools") exclude("com.codahale","jerkson_2.8.1") exclude("com.codahale","jerkson") exclude("com.twitter","streamyj_2.8.1") exclude("org.codehaus.jackson" , "jackson-mapper-asl") exclude("org.codehas.jackson" , "jackson-core-asl"),
+ "org.elasticsearch" % "elasticsearch" % "0.19.3" % "compile" exclude("log4j", "log4j") exclude("com.sun.jmx","jmxri") exclude("com.sun.jdmk","jmxtools") exclude("com.codahale","jerkson_2.8.1") exclude("com.codahale","jerkson") exclude("com.twitter","streamyj_2.8.1") exclude("org.codehaus.jackson" , "jackson-mapper-asl") exclude("org.codehas.jackson" , "jackson-core-asl"),
"org.codehaus.jackson" % "jackson-mapper-asl" % "1.8.8",
"org.codehaus.jackson" % "jackson-core-asl" % "1.8.8",
"org.scala-tools.testing" %% "scalacheck" % scalaCheckVersion % "test",
View
2 src/main/scala/com/foursquare/slashem/Ast.scala
@@ -224,7 +224,7 @@ object Ast {
fieldName
}
def elasticBoost(): Pair[List[String],String] = {
- Pair(Nil,"(doc['" + fieldName + "'].value)")
+ Pair(Nil,"doc['" + fieldName + "'].value")
}
}
View
7 src/test/scala/com/foursquare/slashem/ElasticQueryTest.scala
@@ -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 e46a22b

Please sign in to comment.