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

extended search API #11097

Merged
merged 7 commits into from
Dec 19, 2024
Merged

Conversation

stevenwinship
Copy link
Contributor

@stevenwinship stevenwinship commented Dec 16, 2024

What this PR does / why we need it: For the SPA, in order to display the lock icon, and tags/categories information for items in the collection page, we should add some extra properties to each file item from search api once type=file.

  • restricted: boolean
  • canDownloadFile: boolean ( from file user permission)
  • categories: array of string "categories" would be similar to what it is in metadata api, for example, {"label":"blob","description":"","restricted":true,"categories":["Data","Documentation"],"id":6}

For tabular files, there are some properties needed additionally.

  • tabularTags: array of string for example,{"tabularTags" : ["Event", "Genomics", "Geospatial"]}
  • variables: number/int shows how many variables we have for the tabular file
  • observations: number/int shows how many observations for the tabular file

Also, for dataset search api type=dataset, because datasets' thumbnail should be displayed, an extra property is needed.

  • thumbnail: string

Which issue(s) this PR closes: #11027

Special notes for your reviewer: Dataset field "thumbnail" is already included as "image_url" so it was not added

Suggestions on how to test this: See SearchIT

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?: Included

Additional documentation:

@stevenwinship stevenwinship self-assigned this Dec 16, 2024
@stevenwinship stevenwinship added the FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) label Dec 16, 2024
@stevenwinship stevenwinship added Type: Feature a feature request User Role: API User Makes use of APIs Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) SPA These changes are required for the Dataverse SPA GREI Re-arch Issues related to the GREI Dataverse rearchitecture SPA.Q4.2 Collection Page: Extended item cards information labels Dec 16, 2024
@coveralls
Copy link

coveralls commented Dec 16, 2024

Coverage Status

coverage: 22.572% (+0.001%) from 22.571%
when pulling 1e47153 on 11027-extend-datasets-files-from-search-api
into e3b5795 on develop.

This comment has been minimized.

2 similar comments

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@stevenwinship
Copy link
Contributor Author

RE:
Also, for dataset search api type=dataset, because datasets' thumbnail should be displayed, an extra property is needed. thumbnail: string

The thumbnail url is already included in the search result for datasets
"image_url": "http://localhost:8080/api/datasets/3/logo",

@stevenwinship
Copy link
Contributor Author

stevenwinship commented Dec 16, 2024

example of dataset with image_url:
{ "name": "Darwin's Finches", "type": "dataset", "url": "https://doi.org/10.5072/FK2/3ENEDH", "image_url": "http://localhost:8080/api/datasets/3/logo",

example of Tab File with new fields:
{ "name": "test.tab", "type": "file", ... "restricted": true, "variables": 3, "observations": 10, "canDownloadFile": true, "categories": [ "Data" ], "tabularTags": [ "Genomics", "Survey" ],

@pdurbin pdurbin changed the title extened search api extended search API Dec 16, 2024

This comment has been minimized.

@stevenwinship stevenwinship removed their assignment Dec 16, 2024
@sekmiller sekmiller self-assigned this Dec 17, 2024
<field name="canDownloadFile" type="boolean" stored="true" indexed="false" multiValued="false"/>
<field name="variableCount" type="plong" stored="true" indexed="false" multiValued="false"/>
<field name="observations" type="plong" stored="true" indexed="false" multiValued="false"/>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added variable count and observations for completeness.

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11027-extend-datasets-files-from-search-api
ghcr.io/gdcc/configbaker:11027-extend-datasets-files-from-search-api

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a small tweak to the release notes, but otherwise looks good.

@sekmiller sekmiller removed their assignment Dec 18, 2024
@ofahimIQSS ofahimIQSS self-assigned this Dec 19, 2024
@ofahimIQSS
Copy link
Contributor

Tests are passing - merging pr

@ofahimIQSS ofahimIQSS merged commit 77caada into develop Dec 19, 2024
14 checks passed
@ofahimIQSS ofahimIQSS deleted the 11027-extend-datasets-files-from-search-api branch December 19, 2024 18:36
@ofahimIQSS ofahimIQSS removed their assignment Dec 19, 2024
@pdurbin pdurbin added this to the 6.6 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) SPA.Q4.2 Collection Page: Extended item cards information SPA These changes are required for the Dataverse SPA Type: Feature a feature request User Role: API User Makes use of APIs
Projects
Status: Merged 🚀
Development

Successfully merging this pull request may close these issues.

Extend datasets' and files' property from search API endpoint
5 participants