-
Notifications
You must be signed in to change notification settings - Fork 5
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
Comments
📆 05/2024 status: In work. Delayed 1 sprint due to delays in NASA-PDS/registry#185. No impact on build expected |
@tloubrieu-jpl has this and/or will this be implemented in the improvements you are performing now? |
📆 06/2024 status: delayed another sprint per NASA-PDS/registry#185 |
latest
and all
functionality for all endpointslatest
and all
functionality for all endpoints
Closing this ticket for this build. Will revisit version history in later build. Not super critical since it is an off-nominal use case. |
latest
and all
functionality for all endpointslatest
functionality for all endpoints
💡 Description
Need to update this for consistency across the API
⚔️ Sub-tasks
/products
endpoint #426As a user, I want to search for all versions of a product where the LID changed during the product history #427/products/{logical_identifier}
endpoint) #503As a user, I want to resolve all versions of a product when given a product{identifier}
#504/products/{logical_identifier}
endpoint) #435Engineering 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 asuperseded_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#L817It 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.The text was updated successfully, but these errors were encountered: