Closed codycooperross closed 1 month ago
Oh, interesting. Thanks for reporting, @codycooperross. I've reproduced this in both Firefox and Chrome on my Mac. The count of organizations stays the same, so I'm assuming for the moment at least that the result list is the same, but the first returned record does change upon every request.
Have reproduced with this filter in v2 as well, and it also occurs with the types
filter and without any filter at all (e.g., https://api.ror.org/v2/organizations).
This is likely due to inconsistent document ordering between replicas and no explicit ordering in applied in the ElasticSearch request.
Closing as fix is merged to dev branch
Version The version of the ROR schema and/or API you are using: v1, v2, or unknown.
v1
Describe the bug A clear and concise description of what the bug is.
The organizations endpoint appears to return two different but internally consistent lists per page. If you refresh the following a few times, the results seem to oscillate between two lists: https://api.ror.org/organizations?filter=country.country_code:CL The same is true for every succeeding page: https://api.ror.org/organizations?filter=country.country_code:CL&page=2
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
While paging, each page returns a consistent list of results.
Screenshots If applicable, add screenshots to help explain your problem.
Device information:
Additional context Add any other context about the problem here.
A user noticed this inconsistency while using the DataCite GraphQL API for organizations to retrieve a list of organizations with country code CL. Because the pages seem to switch around, they were retrieving duplicate results.