Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityDao cannot build Way from projected GetResponse since ES doesn't return shape fields #15

Open
christopherlakey opened this issue Sep 11, 2014 · 1 comment

Comments

@christopherlakey
Copy link

Since elasticsearch 1.x does not return shape fields from the index, only from source, the current EntityDao cannot build a Way using the results of buildMultiGetRequest.

Choices are to fetch the entire source object or to store the geometry as a separate non-analyzed field, perhaps encoded as OGC WKT for compactness.

Due to the complex input structure and index representation of shapes, it is not currently possible to sort shapes or retrieve their fields directly. The geo_shape value is only retrievable through the _source field.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html

@milovanderlinden
Copy link
Contributor

I think I resolved the issue by replacing:

request.add(new Item(indexName, type.getIndiceName(), String.valueOf(osmId))
                    .fields("centroid", "lengthKm", "areaKm2", "shape", "tags"));

with

request.add(new Item(indexName, type.getIndiceName(), String.valueOf(osmId)));

And working with fields later in the process

milovanderlinden added a commit to dogodigi/elasticsearch-osmosis-plugin that referenced this issue Nov 30, 2014
milovanderlinden added a commit to dogodigi/elasticsearch-osmosis-plugin that referenced this issue Nov 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants