-
-
Notifications
You must be signed in to change notification settings - Fork 305
Description
As reported by @klmn-hun in the wis2box discussions page:
if I try to get notification messages from the API by specifying both the metadata_id and the wigos_station_identifier query parameters,
(e.g.
{WIS2BOX_API_URL/collections/messages/items?f=json&wigos_station_identifier=0-348-1-13704&metadata_id=urn%3Awmo%3Amd%3Ahu-hungaromet%3Asurface-weather-observations.gbon)
I get results also for stations with different wigosID.
On the other hand if I modify the order of the query parameters, i.e. first specify metadata_id and after that wigos_station_identifier,
I get results only for the desired station but for both datasets.
So it seems that only the last query parameter is taken into account.
In pygeoapi package in the module provider/elasticsearch_.py when processing the 'properties' parameter there is a loop for the properties and after the loop it checks if prop[1] contains '|' and adds minimum_should_match ='100%' if it doesn't contain.
However this if statement should be inside the loop.
If I put the if statement inside the loop the message query I mentioned above works as expected.