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

Implement expected latest functionality for all endpoints #428

Closed
jordanpadams opened this issue Mar 28, 2024 · 4 comments
Closed

Implement expected latest functionality for all endpoints #428

jordanpadams opened this issue Mar 28, 2024 · 4 comments

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Mar 28, 2024

💡 Description

Need to update this for consistency across the API

⚔️ Sub-tasks

Engineering Discussion

I believe we narrowed the all versions functionality to only show up when someone specifies /products/{identifier}/all, since this is a very specialized use case for trying to track down provenance of a product.

From a user perspective, rarely do end users actually want to search for and/or find old versions of products. They are irrelevant to current science use cases, and we do not want to present that to the users. Newer versions indicate better metadata and better data. This is why the default functionality for all endpoints (except this specialized one) should be only return the latest versions (those without a superseded_by specified).

This is one of the conversations @tloubrieu-jpl and I were having about functionality in the API that we could potentially abstract away using an OpenSearch query template (or something else)? Since we want this built into all queries of the API by default (except for the very specialized /products/{identifier}/all, we should figure out a way to ensure it is always there. For instance, in our legacy solr schema, we have these RequestHandler endpoints that response with pre-filtered results: https://github.com/NASA-PDS/registry-mgr-legacy/blob/main/src/main/resources/collections/data/solrconfig.xml#L817

It looks like OpenSearch/ElasticSearch may use query templates for this? https://sematext.com/blog/parametrizing-queries-in-solr-and-elasticsearch/

UPDATE

Implement this using query parameters
The new query parameter is "all-versions". the values can be 'true' or 'false'. The parameter is optional, default behavior is all-versions=false. Or actually we could see that the other way around latest-only=true by default.

This behavior will replace the suffix /latest or /all to implement the requirement #436 and should be extended to apply to all end-points.

@jordanpadams
Copy link
Member Author

📆 05/2024 status: In work. Delayed 1 sprint due to delays in NASA-PDS/registry#185. No impact on build expected

@jordanpadams jordanpadams moved this from Release Backlog to In Progress in B15.0 Jun 1, 2024
@jordanpadams
Copy link
Member Author

@tloubrieu-jpl has this and/or will this be implemented in the improvements you are performing now?

@jordanpadams
Copy link
Member Author

📆 06/2024 status: delayed another sprint per NASA-PDS/registry#185

@jordanpadams jordanpadams changed the title Verify and implement latest and all functionality for all endpoints Implement expected latest and all functionality for all endpoints Jul 19, 2024
@jordanpadams
Copy link
Member Author

Closing this ticket for this build. Will revisit version history in later build. Not super critical since it is an off-nominal use case.

@jordanpadams jordanpadams changed the title Implement expected latest and all functionality for all endpoints Implement expected latest functionality for all endpoints Aug 9, 2024
@github-project-automation github-project-automation bot moved this from In Progress to 🏁 Done in B15.0 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 🏁 Done
Development

No branches or pull requests

2 participants