Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDS API is not respecting the sort field #262

Closed
msbentley opened this issue Apr 26, 2023 · 3 comments · Fixed by #263
Closed

PDS API is not respecting the sort field #262

msbentley opened this issue Apr 26, 2023 · 3 comments · Fixed by #263
Assignees
Labels
B14.0 bug Something isn't working

Comments

@msbentley
Copy link

msbentley commented Apr 26, 2023

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When including the sort field, the API doesn't seem to return data sorted as expected (there is no change).

🕵️ Expected behavior

I expect the API to respect the sort order, or to given error if this is not possible.

📜 To Reproduce

r = requests.get(pds_url + 'products',
    params={
        'limit': 10,
         'q': 'pds:Time_Coordinates.pds:start_date_time gt "2023-01-01T00:00:00Z"',
         'fields': 'lid, pds:Time_Coordinates/pds:start_date_time, pds:Time_Coordinates/pds:stop_date_time',
         'sort': 'pds:Time_Coordinates.pds:start_date_time desc'})

pd.DataFrame.from_dict(r.json()['data'])

The same data are returned in the same order above whether I include asc or desc in the sort parameter, or indeed if I choose another field to sort by.

I have also tried with different return types, e.g. CSV, with the same result, e.g.

image

🖥 Environment Info

No response

📚 Version of Software Used

No response

🩺 Test Data / Additional context

No response

🦄 Related requirements

🦄 #xyz

⚙️ Engineering Details

No response

@jordanpadams
Copy link
Member

@tloubrieu-jpl i think this is still an issue? Can we update the docs to either note this doesn’t work or remove?

@alexdunnjpl
Copy link

@tloubrieu-jpl
Copy link
Member

Hi @msbentley , the sort parameter is not implemented in the registry-api service. I will make that clear in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B14.0 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants