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

Sorting doesn't work consistently across datatypes #142

Open
joepio opened this issue Jun 27, 2021 · 3 comments
Open

Sorting doesn't work consistently across datatypes #142

joepio opened this issue Jun 27, 2021 · 3 comments
Assignees
Labels
bug Something isn't working lib rust atomic-lib (rust) server atomic-server

Comments

@joepio
Copy link
Member

joepio commented Jun 27, 2021

Sorting by string works pretty well, but:

  • Boolean sort doesn't work (0 1 0 0)
  • resource array is weird (should check length, I think?)
  • Integer doesn't work (what?)
  • Sorting by relation should sort by URL
@joepio joepio added bug Something isn't working lib rust atomic-lib (rust) server atomic-server labels Jun 27, 2021
@joepio
Copy link
Member Author

joepio commented Mar 23, 2022

Looks like all of this is fixed in #114

@joepio joepio closed this as completed Mar 23, 2022
@Polleps
Copy link
Member

Polleps commented Jun 26, 2023

Sorting in collections does not work correctly on the following types:

  • Integers and floats get sorted alphabetically (0 > 100 > 15)
  • Timestamps seem to work fine most of the time but not when old dates are mixed in (03/01/1970 > 31/05/2023 > 14/03/2023). Maybe these are also sorted alphabetically.
  • Resource Arrays seem to be sorted only on length but should probably also be sorted alphabetically within each length group (preferably on the Resource title but at the very least on its subject).

@Polleps Polleps reopened this Jun 26, 2023
@joepio joepio self-assigned this Jan 8, 2024
@joepio
Copy link
Member Author

joepio commented Jan 8, 2024

I should probably use https://docs.rs/lexical-sort/latest/lexical_sort/ or similar in Atom::to_sortable_string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib rust atomic-lib (rust) server atomic-server
Projects
None yet
Development

No branches or pull requests

2 participants