Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Feature] Extend EDAM endpoint with sorting capabilities #2642

Closed rrchai closed 2 months ago

rrchai commented 2 months ago

What product(s) is this feature for?

OpenChallenges

Description

Enable to allow EDAM results to be sorted alphabetically and by relevance, and/or by other sorting types as needed.

By default, the EDAM results should be listed alphabetically. When a user applies a search term to filter the EDAM results, the results should be sorted by relevance. By default, the EDAM results should be sorted by relevance.

Anything else?

No response

Code of Conduct

tschaffter commented 2 months ago

We can reuse the implementation that we use for challenges. Is it OK to keep the default sorting by relevance at the backend level and then at the client level you specify the sorting strategy you want to apply?

rrchai commented 2 months ago

Is it OK to keep the default sorting by relevance at the backend level and then at the client level you specify the sorting strategy you want to apply?

Yes, this is correct. I have updated the description to sort results by relevance as the default in the backend.

tschaffter commented 2 months ago

@rrchai Actually, the sorting strategy by relevance applies a sorting by preferred label if the search terms specified are empty. This is different from what I've said before and should simplify the code in the web app.