Geoserver WFS GetFeature with multiple featureid/resourceid returns multiple times the same feature

Description

Hello Team,

We are facing the below issue with WFS GetFeature Request.

That is, Response gives different Feature count with type-name and* without type-name* having same FeatureIDs passed.

Below sample requests are for your reference

case-1: With type-name
http://localhost:8080/geoserver/sf/wfs?REQUEST=GetFeature&version=2.0.0&outputFormat=application/json&typeName=sf:roads&FEATUREID=roads.47,roads.50
Result:- Passed 2 featureids(roads.47,roads.50) as parameter and result gives 2 features
If we will pass 3 featureids as parameter then outcome will be 3

case-2: Without type-name with same feature type
http://localhost:8080/geoserver/sf/wfs?REQUEST=GetFeature&version=2.0.0&outputFormat=application/json&FEATUREID=roads.47,roads.50
Result:- Passed 2 featureids(roads.47,roads.50) as parameter and result gives 4 features
If we will pass 3 featureids as parameter then outcome will be 9

So concern is with 2nd case. We are getting wrong result from the WFS Request.

Thanks

Environment

None

Activity

Show:
Andrea Aime
February 15, 2017, 11:46 AM

Mass closing all resolved issues not modified in the last 4 weeks

Andrea Aime
July 22, 2016, 9:13 AM

Patch applied with small modifications and added a test

Jukka Rahkonen
June 30, 2016, 11:44 AM
Andrea Aime
October 4, 2015, 12:51 PM

Note to self, the patch covers GetFeatureKvpRequestReader, there is no indication whether the POST XML path is affected too, or not.

Andrea Aime
September 26, 2015, 8:51 AM

Aaah Jukka, you are right, in WFS 2.0 featureid is, or should be, ignored, RESOURCEID should be used instead.

Fixed

Assignee

Andrea Aime

Reporter

Anshuman Nayak

Fix versions

Affects versions