SDFIdk / skraafoto_stac_public

Other
6 stars 1 forks source link

Discrepancy with POST /search collections parameter #49

Closed JesperKock closed 2 years ago

JesperKock commented 2 years ago

Expectation:

These calls return the same number of matches: Bracket call: https://api.dataforsyningen.dk/skraafotoapi_test/search?collections=[skraafotos2017,skraafotos2019,skraafotos2021] Nonbracket call: https://api.dataforsyningen.dk/skraafotoapi_test/search?collections=skraafotos2017,skraafotos2019,skraafotos2021

Result:

Bracket call:

{
  "returned": 10,
  "limit": 10,
  "matched": 1340146
}

Nonbracket call:

{
  "returned": 10,
  "limit": 10,
  "matched": 3914985
}
JesperKock commented 2 years ago

Using brackets does not imply a list in this case, therefore the collections [skraafotos2017 skraafotos2021] isn't found and returns 0 matches.

Result of https://api.dataforsyningen.dk/skraafotoapi_test/search?collections=skraafotos2019

{
  "returned": 10,
  "limit": 10,
  "matched": 1340146
}

Result of https://api.dataforsyningen.dk/skraafotoapi_test/search?collections=[skraafotos2017,skraafotos2021]&token=6facc083125944186a88d332e2cf6903

{
  "returned": 0,
  "limit": 10,
  "matched": 0
}