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

WFS FeatureID query values #120

Open
StephenBMarwick opened this issue Feb 7, 2021 · 2 comments
Open

WFS FeatureID query values #120

StephenBMarwick opened this issue Feb 7, 2021 · 2 comments

Comments

@StephenBMarwick
Copy link

StephenBMarwick commented Feb 7, 2021

When querying using WFS with GetFeature, responses are returned with the elastic id prefixed with layer id as the id (aka featureid). Attempting to obtain a specific feature using the returned featureid results in no results being returned.

Looking at the query being sent to ElasticSearch, it seems that ElasticGeo is not stripping the layer id prefix before forwarding the query. ElasticSearch has no concept of the layer name that ElasticGeo provides, so it does not match anything.

I'm using the following versions:

  • GeoServer: 2.16.1
  • ElasticGeo: latest on master (2.16.0-RC1?)
  • ElasticSearch: 7.1.1

Is there some configuration setting that I might be missing?

@albertwgchu
Copy link

We've encountered the same issue as you describe. We use javascript to strip out the layer id prefix as a work around.

I'm not sure if the layer id prefix is needed? Maybe for collisions when there's multiple layers? If not it would be preferable to just use the elastic id.

@StephenBMarwick
Copy link
Author

Thanks for the sanity check @albertwgchu. A little reading I did suggested it was something to do with the GML identifier gml:id needing to start with an alpha (not numeric) character. As this can't be guaranteed with Elasticsearch, which does allow identifiers to start with numerics, another identifier is added. Unfortunately, I can't find the reference to put here. I don't think this is a particularly strong reason to use the layer id, so I suspect there are other reasons behind the decision.
I'm looking to modify the code to strip the layer id on inbound queries. I'll probably feed the change back here as a PR when I'm ready.

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