server/src/tests/Controllers/GeoStatsControllerTest.php
changeset 387 7fba86fa8604
parent 320 0fce13da58af
child 407 2dba812c7ef2
--- a/server/src/tests/Controllers/GeoStatsControllerTest.php	Mon Oct 31 14:24:23 2016 +0100
+++ b/server/src/tests/Controllers/GeoStatsControllerTest.php	Thu Nov 03 01:52:26 2016 +0100
@@ -116,13 +116,20 @@
 
     public function testGetIndexArea()
     {
+
         $query = [
-            'index' => env('ELASTICSEARCH_INDEX'),
-            'body' => [
+            "index" => env('ELASTICSEARCH_INDEX'),
+            "body" => [
                 "size" => 0,
                 "query" => [
-                    'term' => [
-                        "geonames_hierarchy" => "code_area"
+                    "constant_score" => [
+                        "filter" => [
+                            "bool" => [
+                                "must" => [ [
+                                    "term" => [ "geonames_hierarchy" => "code_area" ]
+                                ] ]
+                            ]
+                        ]
                     ]
                 ],
                 "aggs" => [