-
Notifications
You must be signed in to change notification settings - Fork 531
feat: return list of collections of datasets in search API #11558
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
Conversation
|
Please resolve the conflicts. |
# Conflicts: # doc/sphinx-guides/source/api/search.rst # src/main/java/edu/harvard/iq/dataverse/api/Search.java # src/main/java/edu/harvard/iq/dataverse/search/SearchIncludeFragment.java # src/main/java/edu/harvard/iq/dataverse/search/SolrSearchServiceBean.java
|
@stevenwinship the conflicts have been resolved. |
|
There is one test failing testShowCollections – edu.harvard.iq.dataverse.api.SearchIT 1 expectation failed. java.lang.AssertionError: |
|
It seems like the test was flaky because the order of the collections being returned wasn't fixed. It should work now. |
|
tests are passing - merging PR |
What this PR does / why we need it:
This PR adds a
show_collectionsparameter for dataset results to the search API.When the parameter is set, each result includes a
collectionsarray showing the dataset’s parent and linked collections. Each entry includesid,name, andalias, for example:Which issue(s) this PR closes:
Not aware of any issue.
Special notes for your reviewer:
/
Suggestions on how to test this:
Create at least one dataset, run searches via the search API with and without
show_collections=trueto see that if the param is set, the list of collections is returned, otherwise the search response is unchanged.I've added a test:
mvn test -Dtest="SearchIT#testShowCollections"Does this PR introduce a user interface change? If mockups are available, please link/include them here:
/
Is there a release notes update needed for this change?:
I will add a short release note
Additional documentation:
In our custom UI, we want to display the list of collections of each search result, which is why we would like this feature. See this screenshot: