Closed francbartoli closed 8 years ago
Thanks for the bug report. Can you try pulling and building the latest code? I just pushed an update to hopefully resolve this issue.
@sjudeng tested your latest code but the issue is still there
I'm not able to reproduce this anymore (I could initially, before the latest commit). Tested with elasticsearch-2.2.2 and geoserver-2.8.3 (see below). Make sure you've done a clean build from source and removed the previous version.
ogr2ogr -lco INDEX_NAME=bugsites -lco MAPPING_NAME=bugsites -lco FID=ID -lco GEOMETRY_NAME=geometry -lco GEOM_MAPPING_TYPE=GEO_POINT -s_srs EPSG:26713 -t_srs EPSG:4326 -f "ElasticSearch" http://localhost:9200 geoserver/data/data/sf/bugsites.shp
I did a clean install. This is my request output in debug mode:
2016-06-15 21:00:10,283 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
2016-06-15 21:00:10,288 INFO [org.geoserver.wfs] -
Request: getServiceInfo
2016-06-15 21:00:10,551 INFO [org.geoserver.wfs] -
Request: getFeature
service = WFS
version = 1.0.0
baseUrl = http://localhost:8080/geoserver/
query[0]:
typeName[0] = {http://opengeo.org}mfermate
maxFeatures = 50
outputFormat = application/json
resultType = results
2016-06-15 21:00:10,613 INFO [org.geoserver.wfs.json] - about to encode JSON
2016-06-15 21:00:10,647 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
2016-06-15 21:00:10,647 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.
Did not have time to have a look at the code but the last messages are the expected behavior in your code? Do you have the same in your environment?
@sjudeng forgot my messages, I'm a stupid man. I did the clean install from the web directory instead from the root pom
Now work properly. However I had to set this startup parameter to avoid a class not loading:
-DGEOSERVER_XSTREAM_WHITELIST=mil.nga.giat.data.elasticsearch.ElasticAttribute
Does make sense to add in the docs?
I just pushed one more commit on this. While the original fix addressed the mapping and feature reading issue, in further testing I found filtering wasn't working properly for this case. Should be okay now.
The XStream environment variable shouldn't be necessary. Can you provide steps to reproduce the relevant exception you're seeing? If so, please open a new issue for this.
After loading a shapefile with the ogr2ogr driver:
ogr2ogr -progress -lco INDEX_NAME=elasticday -lco MAPPING_NAME=mfermate -lco FID=ID -lco GEOMETRY_NAME=geometry -lco GEOM_MAPPING_TYPE=GEO_POINT -s_srs EPSG:32632 -t_srs EPSG:4326 -f "ElasticSearch" http://localhost:9200 MM_FERM.shp
I see it properly created in the index but when I try to publish into GS the BBOX is not recognized and a WFS call simply shows all the geometry null
OLD INDEX
NEW INDEX
I've attempted with different environment and I've got the same result:
OSX 10.9.5 JVM 1.7 OpenGeo Suite 4.8 (GeoServer 2.8-SNAPSHOT) ELASTICGEO 2.8-SNAPSHOT (successfully compiled from source) ES 2.2
UBUNTU 14.04 JVM 1.7 TOMCAT 7 GEOSERVER 2.8.3 ELASTICGEO Precompiled 2.8.3 ES 2.2
Incidentally I've in the same ES cluster an index created with the 1.7 version and the plugin is able to create layers from that with the expected geometries.