Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

merge funtimes #53

Merged
merged 5 commits into from

1 participant

@holdenk

No description provided.

@holdenk holdenk closed this
@holdenk holdenk reopened this
@holdenk holdenk merged commit 7ac8fd2 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. @holdenk

    Fix optimizer.

    holdenk authored
    * Optimizer now removes filter (_.metall any) . Yes this is kind of dumb but
      it is a good starting point.
  2. @holdenk
  3. @holdenk
  4. @holdenk

    Bump version #

    holdenk authored
  5. @holdenk
This page is out of date. Refresh to see the latest.
View
3  build.sbt
@@ -1,6 +1,6 @@
name := "slashem"
-version := "0.14.2"
+version := "0.14.3"
organization := "com.foursquare"
@@ -55,6 +55,7 @@ resolvers += "codehaus maven repo" at "http://repository.codehaus.org/"
resolvers += "sonatype maven repo" at "http://oss.sonatype.org/content/repositories/releases/"
+
resolvers <++= (version) { v =>
if (v.endsWith("-SNAPSHOT"))
Seq(ScalaToolsSnapshots)
View
16 src/test/scala/com/foursquare/slashem/ElasticQueryTest.scala
@@ -257,11 +257,11 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
val r = ESimpleGeoPanda where(_.id eqs new ObjectId("4c809f4251ada1cdc3790b16")) fetch()
val lr = r.response.results
Assert.assertEquals(lr.length, 1)
- Assert.assertEquals(lr.apply(0).point.value, (-32.0, 74.0))
+ Assert.assertEquals(lr.apply(0).point.value, (37.787355, -122.403439))
}
@Test
def geoOrderDesc {
- var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(74.0,-31.0)) fetch()
+ var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(40,-74)) fetch()
Assert.assertEquals(2,r.response.results.length)
val doc0 = r.response.oidScorePair.apply(0)
val doc1= r.response.oidScorePair.apply(1)
@@ -270,7 +270,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
}
@Test
def geoOrderDescWithBoost {
- var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(74.0,-31.0)) boostField(_.decayedPopularity1,0.001) fetch()
+ var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(40,-74)) boostField(_.decayedPopularity1,0.001) fetch()
Assert.assertEquals(2,r.response.results.length)
val doc0 = r.response.oidScorePair.apply(0)
val doc1= r.response.oidScorePair.apply(1)
@@ -279,7 +279,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
}
@Test
def geoOrderAsc {
- var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74.0,-31.0)) fetch()
+ var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) fetch()
Assert.assertEquals(2,r.response.results.length)
val doc0 = r.response.oidScorePair.apply(0)
val doc1= r.response.oidScorePair.apply(1)
@@ -288,7 +288,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
}
@Test
def geoOrderAscWithBoostField {
- var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74.0,-31.0)) boostField(_.decayedPopularity1,0.001) fetch()
+ var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) boostField(_.decayedPopularity1,0.001) fetch()
Assert.assertEquals(2,r.response.results.length)
val doc0 = r.response.oidScorePair.apply(0)
val doc1= r.response.oidScorePair.apply(1)
@@ -297,7 +297,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
}
@Test
def geoOrderIntAsc {
- var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74,-31)) fetch()
+ var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) fetch()
Assert.assertEquals(2,r.response.results.length)
val doc0 = r.response.oidScorePair.apply(0)
val doc1= r.response.oidScorePair.apply(1)
@@ -709,7 +709,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
.startObject()
.field("name","ordertest")
.field("id","4c809f4251ada1cdc3790b16")
- .field("point",74.0,-32.0)
+ .field("point",-122.403439,37.787355)
.endObject()
).execute()
.actionGet();
@@ -717,7 +717,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
.startObject()
.field("name","ordertest")
.field("id","4c809f4251ada1cdc3790b17")
- .field("point",74.0,-31.0)
+ .field("point",-73.99039768,40.73709857)
.endObject()
).execute()
.actionGet();
View
1  src/test/scala/com/foursquare/slashem/OptimizeTest.scala
@@ -40,5 +40,4 @@ class OptimizeTest extends SpecsMatchers with ScalaCheckMatchers {
"rows" -> "10").sortWith(_._1 > _._1))
}
-
}
Something went wrong with that request. Please try again.