Checked for duplicates
Yes - I've already checked
π Describe the bug
The /products endpoint returns multiple versions of the same LID in a single query result, even when no version filter is applied. This is unexpected β callers querying for context products generally expect to receive the latest version of each LID, not all historical versions.
π To Reproduce
The following query returns two versions of urn:nasa:pds:context:facility:laboratory.relab (::1.0 and ::1.1):
https://pds.mcp.nasa.gov/api/search/1/products?q=(lid%20eq%20%22urn:nasa:pds:context:facility:laboratory.relab%22)
A broader query for all Product_Context products reveals 9 LIDs with multiple versions returned:
| LID |
Versions returned |
urn:nasa:pds:context:facility:laboratory.relab |
1.0, 1.1 |
urn:nasa:pds:context:instrument:relab.bd-vnir |
1.0, 1.2 |
urn:nasa:pds:context:instrument:relab.bc-ftir1 |
1.0, 1.2 |
urn:nasa:pds:context:instrument:relab.bcf-ftir2 |
1.0, 1.2 |
urn:nasa:pds:context:investigation:other_investigation.relab_speclib |
1.0, 2.1 |
urn:esa:psa:context:instrument_host:spacecraft.vex |
1.1, 1.2 |
urn:esa:psa:context:investigation:mission.venus_express |
1.1, 1.1 (same LIDVID from two nodes) |
urn:esa:psa:context:instrument:vex.mag |
1.2, 1.2 (same LIDVID from two nodes) |
urn:esa:psa:context:instrument:vex.virtis |
1.2, 1.2 (same LIDVID from two nodes) |
The last three (vex.mag, vex.virtis, mission.venus_express) are particularly concerning β the exact same LIDVID appears twice, harvested from two different registry nodes (PDS_ENG and PSA).
This was discovered while investigating a downstream bug in the validate tool (NASA-PDS/validate#1632), where validate -u downloads all context products and the presence of older versions alongside newer ones causes false context_ref_mismatch warnings for users with valid labels.
π΅οΈ Expected behavior
A query for Product_Context products should return at most one entry per LID β either the latest version only, or deduplicate exact-LIDVID duplicates arising from multi-node harvesting.
π₯ Environment Info
Production API: https://pds.mcp.nasa.gov/api/search/1/
π Version of Software Used
PDS Search API (production)
π©Ί Additional context
- The
ops:Provenance.ops:superseded_by field on all returned products is set to the string "null" β even on genuinely superseded older versions β so there is currently no way for API clients to filter out old versions server-side.
- A
latest-only endpoint (/products/latest) returns HTTP 404.
- Adding version/latest filters to the
q= parameter returns HTTP 400.
π€ Generated with Claude Code
Checked for duplicates
Yes - I've already checked
π Describe the bug
The
/productsendpoint returns multiple versions of the same LID in a single query result, even when no version filter is applied. This is unexpected β callers querying for context products generally expect to receive the latest version of each LID, not all historical versions.π To Reproduce
The following query returns two versions of
urn:nasa:pds:context:facility:laboratory.relab(::1.0and::1.1):A broader query for all
Product_Contextproducts reveals 9 LIDs with multiple versions returned:urn:nasa:pds:context:facility:laboratory.relaburn:nasa:pds:context:instrument:relab.bd-vnirurn:nasa:pds:context:instrument:relab.bc-ftir1urn:nasa:pds:context:instrument:relab.bcf-ftir2urn:nasa:pds:context:investigation:other_investigation.relab_specliburn:esa:psa:context:instrument_host:spacecraft.vexurn:esa:psa:context:investigation:mission.venus_expressurn:esa:psa:context:instrument:vex.magurn:esa:psa:context:instrument:vex.virtisThe last three (
vex.mag,vex.virtis,mission.venus_express) are particularly concerning β the exact same LIDVID appears twice, harvested from two different registry nodes (PDS_ENGandPSA).This was discovered while investigating a downstream bug in the validate tool (NASA-PDS/validate#1632), where
validate -udownloads all context products and the presence of older versions alongside newer ones causes falsecontext_ref_mismatchwarnings for users with valid labels.π΅οΈ Expected behavior
A query for
Product_Contextproducts should return at most one entry per LID β either the latest version only, or deduplicate exact-LIDVID duplicates arising from multi-node harvesting.π₯ Environment Info
Production API:
https://pds.mcp.nasa.gov/api/search/1/π Version of Software Used
PDS Search API (production)
π©Ί Additional context
ops:Provenance.ops:superseded_byfield on all returned products is set to the string"null"β even on genuinely superseded older versions β so there is currently no way for API clients to filter out old versions server-side.latest-only endpoint (/products/latest) returns HTTP 404.q=parameter returns HTTP 400.π€ Generated with Claude Code