cga-harvard / Hypermap-Registry

Hypermap Registry, remote map services made easy for your SDI
https://cga-harvard.github.io/Hypermap-Registry/
MIT License
38 stars 21 forks source link

Indexing fails in elasticsearch > 5 #227

Open ingenieroariel opened 8 years ago

ingenieroariel commented 8 years ago
diff --git a/docker-compose.elasticsearch.yml b/docker-compose.elasticsearch.yml
index d9db4cb..763f7c7 100644
--- a/docker-compose.elasticsearch.yml
+++ b/docker-compose.elasticsearch.yml
@@ -2,9 +2,7 @@ version: '2'
 services:

   elasticsearch:
-   image: elasticsearch:1.7
-   # TODO: switch comment to test heatmap support.
-   # image: panchicore/elasticsearch-docker
+   image: terranodo/elasticsearch

   django:
     links:
diff --git a/docker-compose.yml b/docker-compose.yml
index 9d4e30e..beb1e3d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,9 +5,7 @@ services:
     image: terranodo/postgis

   elasticsearch:
-   image: elasticsearch:1.7
-   # TODO: switch comment to test heatmap support.
-   # image: panchicore/elasticsearch-docker
+   image: terranodo/elasticsearch

   rabbitmq:
      image: rabbitmq

Error is:

mapper [max_y] cannot be changed from type [long] to [float]
ingenieroariel commented 8 years ago
diff --git a/hypermap/aggregator/elasticsearch_client.py b/hypermap/aggregator/elasticsearch_client.py
index 971a209..f61ba67 100644
--- a/hypermap/aggregator/elasticsearch_client.py
+++ b/hypermap/aggregator/elasticsearch_client.py
@@ -232,6 +232,10 @@ class ESHypermap(object):
             "mappings": {
                 "layer": {
                     "properties": {
+                        "min_x": {"type": "float"},
+                        "min_y": {"type": "float"},
+                        "max_x": {"type": "float"},
+                        "max_y": {"type": "float"},
                         "layer_geoshape": {
                            "type": "geo_shape",
                            "tree": "quadtree",
JorgeMartinezG commented 8 years ago

These git diffs are to show the new docker images that will be used, right?

JorgeMartinezG commented 8 years ago

@ingenieroariel Could you send the endpoint with the error? It indexed succesfully with http://geonode.state.gov/geoserver/ows

BTW, I'm using terranodo/elasticsearch docker image

ingenieroariel commented 8 years ago

I tested the opengeo one demo.opengeo.org/geoserver/wms

ingenieroariel commented 8 years ago

Did you look at the layers in maploom and they appeared? does the test suite run?

If so, can you create a PR to master with the switch to ES with heatmap?

JorgeMartinezG commented 8 years ago

solr tests not passing...I'll check

JorgeMartinezG commented 8 years ago

@ingenieroariel where are you checking for repo differences? could you please check for

hypermap/search_api/views.py

file?

ingenieroariel commented 8 years ago

If this works for you, please open a PR to move to elasticsearch with heatmap support and close this one.

JorgeMartinezG commented 8 years ago

selenium tests are not passing. If I use curl with this url

http://localhost:9200/hypermap/_count I get the expected output.

{"count":3,"_shards":{"total":5,"successful":5,"failed":0}

However, if I pass it with nginx http://localhost/_elastic/hypermap/_count I get another result

{"count":0,"_shards":{"total":5,"successful":5,"failed":0}
ingenieroariel commented 8 years ago

that's very strange - do you know why it is happening? can you switch the test to look at the naked elastic url?

On Tue, Oct 11, 2016 at 10:23 AM, Jorge Martínez Gómez < notifications@github.com> wrote:

selenium tests are not passing. If i put in the browser this url. If I use curl with this url

http://localhost:9200/hypermap/_count I get the expected output.

{"count":3,"_shards":{"total":5,"successful":5,"failed":0}

However, if I pass it with nginx http://localhost/_elastic/hypermap/_count I get another result

{"count":0,"_shards":{"total":5,"successful":5,"failed":0}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cga-harvard/HHypermap/issues/227#issuecomment-252950266, or mute the thread https://github.com/notifications/unsubscribe-auth/AADW11Dn2L_DZ-AkmxuNZGsGAwmKVMJHks5qy6n3gaJpZM4KQFwr .

capooti commented 7 years ago

@ingenieroariel @JorgeMartinezG can we close this?