NASA-PDS / registry-api

Web API service for the PDS Registry, providing the implementation of the PDS Search API (https://github.com/nasa-pds/pds-api) for the PDS Registry.
https://nasa-pds.github.io/pds-api
Other
2 stars 5 forks source link

Verify and implement `latest` and `all` functionality for all endpoints #428

Open jordanpadams opened 3 months ago

jordanpadams commented 3 months ago

πŸ’‘ 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/

jordanpadams commented 1 month ago

πŸ“† 05/2024 status: In work. Delayed 1 sprint due to delays in https://github.com/NASA-PDS/registry/issues/185. No impact on build expected

jordanpadams commented 4 days ago

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

jordanpadams commented 4 days ago

πŸ“† 06/2024 status: delayed another sprint per https://github.com/NASA-PDS/registry/issues/185