You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The acceptable values for filtering by offered_by and platform differs between the database and opensearch API endpoints. The database API expects the short code, like "mitpe" while the opensearch API expects the "value", in lowercase, like "professional education".
Also, filtering by platform with the opensearch API doesn't work properly for platforms with multi-word values (like "mitx online") because only the platform code ("mitxonline") is passed on to the search index.
Expected Behavior
Both the database and opensearch API's should have the same options for filtering by platform and offered_by and return the same results.
Decide what we want to provide as platform/offered_by filter options across both API's: the short codes ("mitxonline", "see") with API documentation explaining what each of these codes mean, or the full names (in lower case): "mitx online", "sloan executive education"
Based on the above, ensure that the values we are filtering by are actually in the search index and also filtered correctly by the database.
The acceptable values for filtering by offered_by and platform differs between the database and opensearch API endpoints. The database API expects the short code, like "mitpe" while the opensearch API expects the "value", in lowercase, like "professional education".
Also, filtering by platform with the opensearch API doesn't work properly for platforms with multi-word values (like "mitx online") because only the platform code ("mitxonline") is passed on to the search index.
Expected Behavior
Both the database and opensearch API's should have the same options for filtering by platform and offered_by and return the same results.
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources/?platform=mitxonline
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources_search/?platform=mitxonline
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources/?offered_by=mitpe
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources_search/?offered_by=mitpe
Current Behavior
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources/?platform=mitxonline
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources_search/?platform=mitx+online (returning no results)
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources/?offered_by=mitpe
https://mit-open-rc.odl.mit.edu/api/v1/learning_resources_search/?offered_by=professional+education
Possible Solution
Platform and offered_by codes/values shown below:
The text was updated successfully, but these errors were encountered: