-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat(openchallenges): extend EDAM endpoint with sorting capabilities #2644
feat(openchallenges): extend EDAM endpoint with sorting capabilities #2644
Conversation
Quality Gate passed for 'openchallenges-app'Issues Measures |
Quality Gate passed for 'openchallenges-challenge-service'Issues Measures |
Quality Gate passed for 'openchallenges-organization-service'Issues Measures |
Quality Gate passed for 'openchallenges-image-service'Issues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It seems the results of sorting alphabetic will show the labels with special characters and number first, which means by default they will be the top results displayed in the input data type filter. Would you think we should move those to the bottom, or it's acceptable?
GET {{basePath}}/edamConcepts?searchTerms={
"number": 0,
"size": 100,
"totalElements": 3473,
"totalPages": 35,
"hasNext": true,
"hasPrevious": false,
"edamConcepts": [
{
"id": 1901,
"classId": "http://edamontology.org/format_3010",
"preferredLabel": ".nib"
},
{
"id": 889,
"classId": "http://edamontology.org/data_2178",
"preferredLabel": "1 or more"
},
{
"id": 2923,
"classId": "http://edamontology.org/operation_3640",
"preferredLabel": "18O labeling"
},
{
"id": 891,
"classId": "http://edamontology.org/data_2180",
"preferredLabel": "2 or more"
},
{
"id": 977,
"classId": "http://edamontology.org/data_2363",
"preferredLabel": "2D PAGE data"
},
{
"id": 3408,
"classId": "http://edamontology.org/topic_3521",
"preferredLabel": "2D PAGE experiment"
},
{
"id": 1318,
"classId": "http://edamontology.org/data_2965",
"preferredLabel": "2D PAGE gel report"
},
{
"id": 101,
"classId": "http://edamontology.org/data_0942",
"preferredLabel": "2D PAGE image"
},
{
"id": 978,
"classId": "http://edamontology.org/data_2364",
"preferredLabel": "2D PAGE report"
},
{
"id": 986,
"classId": "http://edamontology.org/data_2372",
"preferredLabel": "2D PAGE spot report"
},
...
@rrchai You are making a good point. A different behavior will be considered in a future PR. |
Closes #2642
cc: @rrchai
Changelog
sort
anddirection
to the search query of the EDAM concept endpointpreferred_label_sort
in Elasticsearchrequests.http
Preview
Sort the challenges by relevance (still by preferred label if search terms is empty):
Development Notes
Check that the property
preferred_label_sort
is indexed by ES: