-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Inconsistent results based on query order
When querying the Met Museum API, the order of the query parameters affects the results.
For example, when querying for sunflowers, the results are different when the query is q=sunflowers&isHighlight=true&hasImages=true and isHighlight=true&hasImages=true&q=sunflowers.
The first query returns 5 results, while the second query returns 24 results.
This inconsistency can lead to confusion and unexpected results for users who expect the same results regardless of the order of the query parameters.
Steps to reproduce
- Query the Met Museum API with the following parameters:
q=sunflowers&isHighlight=true&hasImages=trueisHighlight=true&hasImages=true&q=sunflowers
Expected behavior
The results should be consistent regardless of the order of the query parameters.
Actual behavior
The results are different when the order of the query parameters is changed.
Additional information
- API endpoint: `https://collectionapi.metmuseum.org/public/collection/v1/search`
- Query parameters:
- `q`: Query string
- `isHighlight`: Filter by whether the object is a highlight
- `hasImages`: Filter by whether the object has images
Example
Response to isHighlight=true&hasImages=true&q=sunflowers:
{
"total": 5,
"objectIDs": [
485308,
437329,
761604,
436535,
436121
]
}Response to q=sunflowers&isHighlight=true&hasImages=true:
{
"total": 24,
"objectIDs": [
472562,
544740,
437261,
544320,
200668,
459027,
459028,
206989,
824771,
310453,
438821,
452102,
451725,
39901,
626692,
485416,
436838,
436658,
435621,
435702,
436105,
499559,
435844,
488221
]
}