Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

merge funtimes #53

Merged
merged 5 commits into from over 1 year ago

1 participant

Holden Karau
Holden Karau

No description provided.

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

Showing 5 unique commits by 1 author.

Jul 31, 2012
Holden Karau Fix optimizer.
* Optimizer now removes filter (_.metall any) . Yes this is kind of dumb but
  it is a good starting point.
6551684
Holden Karau Fix index on geo docs used for testing f862257
Holden Karau Update test for new document position 81aa117
Holden Karau Bump version # a8c4823
Holden Karau remove duplicate object in tests d1877d5
This page is out of date. Refresh to see the latest.
3  build.sbt
... ...
@@ -1,6 +1,6 @@
1 1
 name := "slashem"
2 2
 
3  
-version := "0.14.2"
  3
+version := "0.14.3"
4 4
 
5 5
 organization := "com.foursquare"
6 6
 
@@ -55,6 +55,7 @@ resolvers += "codehaus maven repo" at "http://repository.codehaus.org/"
55 55
 
56 56
 resolvers += "sonatype maven repo" at "http://oss.sonatype.org/content/repositories/releases/"
57 57
 
  58
+
58 59
 resolvers <++= (version) { v =>
59 60
   if (v.endsWith("-SNAPSHOT"))
60 61
     Seq(ScalaToolsSnapshots)
16  src/test/scala/com/foursquare/slashem/ElasticQueryTest.scala
@@ -257,11 +257,11 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
257 257
     val r = ESimpleGeoPanda where(_.id eqs new ObjectId("4c809f4251ada1cdc3790b16")) fetch()
258 258
     val lr = r.response.results
259 259
     Assert.assertEquals(lr.length, 1)
260  
-    Assert.assertEquals(lr.apply(0).point.value, (-32.0, 74.0))
  260
+    Assert.assertEquals(lr.apply(0).point.value, (37.787355, -122.403439))
261 261
   }
262 262
   @Test
263 263
    def geoOrderDesc {
264  
-    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(74.0,-31.0)) fetch()
  264
+    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(40,-74)) fetch()
265 265
     Assert.assertEquals(2,r.response.results.length)
266 266
     val doc0 = r.response.oidScorePair.apply(0)
267 267
     val doc1= r.response.oidScorePair.apply(1)
@@ -270,7 +270,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
270 270
   }
271 271
   @Test
272 272
    def geoOrderDescWithBoost {
273  
-    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(74.0,-31.0)) boostField(_.decayedPopularity1,0.001) fetch()
  273
+    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderDesc(_.point sqeGeoDistance(40,-74)) boostField(_.decayedPopularity1,0.001) fetch()
274 274
     Assert.assertEquals(2,r.response.results.length)
275 275
     val doc0 = r.response.oidScorePair.apply(0)
276 276
     val doc1= r.response.oidScorePair.apply(1)
@@ -279,7 +279,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
279 279
   }
280 280
   @Test
281 281
    def geoOrderAsc {
282  
-    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74.0,-31.0)) fetch()
  282
+    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) fetch()
283 283
     Assert.assertEquals(2,r.response.results.length)
284 284
     val doc0 = r.response.oidScorePair.apply(0)
285 285
     val doc1= r.response.oidScorePair.apply(1)
@@ -288,7 +288,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
288 288
   }
289 289
   @Test
290 290
    def geoOrderAscWithBoostField {
291  
-    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74.0,-31.0)) boostField(_.decayedPopularity1,0.001) fetch()
  291
+    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) boostField(_.decayedPopularity1,0.001) fetch()
292 292
     Assert.assertEquals(2,r.response.results.length)
293 293
     val doc0 = r.response.oidScorePair.apply(0)
294 294
     val doc1= r.response.oidScorePair.apply(1)
@@ -297,7 +297,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
297 297
   }
298 298
   @Test
299 299
   def geoOrderIntAsc {
300  
-    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(74,-31)) fetch()
  300
+    var r = ESimpleGeoPanda where (_.name contains "ordertest") complexOrderAsc(_.point sqeGeoDistance(40,-74)) fetch()
301 301
     Assert.assertEquals(2,r.response.results.length)
302 302
     val doc0 = r.response.oidScorePair.apply(0)
303 303
     val doc1= r.response.oidScorePair.apply(1)
@@ -709,7 +709,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
709 709
                                                                           .startObject()
710 710
                                                                           .field("name","ordertest")
711 711
                                                                           .field("id","4c809f4251ada1cdc3790b16")
712  
-                                                                          .field("point",74.0,-32.0)
  712
+                                                                          .field("point",-122.403439,37.787355)
713 713
                                                                           .endObject()
714 714
       ).execute()
715 715
     .actionGet();
@@ -717,7 +717,7 @@ class ElasticQueryTest extends SpecsMatchers with ScalaCheckMatchers {
717 717
                                                                           .startObject()
718 718
                                                                           .field("name","ordertest")
719 719
                                                                           .field("id","4c809f4251ada1cdc3790b17")
720  
-                                                                          .field("point",74.0,-31.0)
  720
+                                                                          .field("point",-73.99039768,40.73709857)
721 721
                                                                           .endObject()
722 722
       ).execute()
723 723
     .actionGet();
1  src/test/scala/com/foursquare/slashem/OptimizeTest.scala
@@ -40,5 +40,4 @@ class OptimizeTest extends SpecsMatchers with ScalaCheckMatchers {
40 40
                              "rows" -> "10").sortWith(_._1 > _._1))
41 41
   }
42 42
 
43  
-
44 43
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.