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

Use alphanumerical sorting as tie-breaker in case of prefLabel policies result in a tie #81

Open
kouralex opened this issue Nov 23, 2020 · 1 comment · May be fixed by #82
Open

Use alphanumerical sorting as tie-breaker in case of prefLabel policies result in a tie #81

kouralex opened this issue Nov 23, 2020 · 1 comment · May be fixed by #82

Comments

@kouralex
Copy link
Contributor

I noticed (due to NatLibFi/Finto-data@26a2d87#diff-b7776f22f1355c1d1fbc86095078db1711cc8e6dea017ad6524fbf3d595617ac) that the preferred value policy selectors are not, by default, deterministic.

I believe these issues could be resolved by appending the policies by a default alphanumerical sorting (there should also be a possibility to reverse this). It should, if possible, be language-dependent as collation order depends on the language of the literal. E.g., 'ä' is sorted before 'b' in English but not in Finnish.

@osma
Copy link
Member

osma commented Aug 30, 2021

There are really two separate aspects here:

  1. The preferred value policy selectors are not deterministic. That's bad - they should be.
  2. You propose a solution which relies on locale-aware alphanumerical sorting. While that's one possible way to solve the issue, I think there are simpler ways that could be used instead. I'll comment on the PR next...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants