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

Search API - Counts per object type behavior #11127

Open
g-saracca opened this issue Jan 2, 2025 · 0 comments
Open

Search API - Counts per object type behavior #11127

g-saracca opened this issue Jan 2, 2025 · 0 comments
Assignees
Labels
FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA.Q4.1 Collection Page: All Filtering Options SPA These changes are required for the Dataverse SPA Type: Bug a defect

Comments

@g-saracca
Copy link
Contributor

Recently a new query param has been added to the search api in order to return the count per object type(&show_type_counts=true).
To fully replicate the JSF version, we should change two different behaviors of how and when this object is returned.

First behaviour:
We need the 3 object types to always be present in the object regardless of the object types sent by the URL.
For example for this search 👇
https://beta.dataverse.org/api/v1/search?q=*&subtree=root&per_page=10&type=dataverse&type=dataset&show_type_counts=true

We have this response 👇, but we need that even if we have not sent the type=file, the count on them is returned anyway and that applies to all object types.

Screen Shot 2025-01-02 at 10 08 56

Second behaviour:
When doing a search that finds no results, the object “total_count_per_object_type” is not returned at all.
For example for this search 👇
https://beta.dataverse.org/api/v1/search?q=ioioioioio&subtree=root&per_page=10&type=dataverse&type=dataset&show_type_counts=true

We have this response 👇, I think it might be better to keep sending the object with each property set to 0 even if no results were found, to respect what the API says to return when sending &show_type_counts=true

Screen Shot 2025-01-02 at 10 19 25

@g-saracca g-saracca added Type: Bug a defect Size: 10 A percentage of a sprint. 7 hours. SPA These changes are required for the Dataverse SPA GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 10 SPA.Q4.1 Collection Page: All Filtering Options labels Jan 2, 2025
@g-saracca g-saracca moved this to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Jan 2, 2025
@cmbz cmbz added the FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) label Jan 2, 2025
@sekmiller sekmiller self-assigned this Jan 6, 2025
@sekmiller sekmiller moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA.Q4.1 Collection Page: All Filtering Options SPA These changes are required for the Dataverse SPA Type: Bug a defect
Projects
Status: In Progress 💻
Development

No branches or pull requests

3 participants