Repository navigation
CMR-10863: Granule search with json query generates all granule queries when collection identifiers are short_name, entry_title, etc. - #2536
Merged
Conversation
eereiter
approved these changes
Nov 4, 2026
zimzoom
approved these changes
Nov 5, 2026
daniel-zamora
force-pushed
the
CMR-10863
branch
from
November 5, 2026 16:31
8c8a960 to
3bdf84a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2536 +/- ##
==========================================
+ Coverage 54.41% 54.45% +0.04%
==========================================
Files 1047 1047
Lines 73542 73552 +10
Branches 2410 2410
==========================================
+ Hits 40017 40055 +38
+ Misses 31247 31221 -26
+ Partials 2278 2276 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
What is the objective?
Granule JSON queries treated collection identifiers (
entry_title,short_name,version,provider,collection_concept_id) as plain granule conditions. As a result, they searched every granule index, or every index for a provider. URL param search resolves these to collections first and searches only those collections' indexes. This change makes JSON queries work the same way.What are the changes?
entry_title,short_name,version,providerandcollection_concept_idare now collection query conditions, the same as their URL params.provider+short_name).collection_concept_idis validated like the URL param: malformed ids and patterns return 400.{"and": [{"or": [{"short_name": "S2"}, {"instrument": "i1"}]}, {"not": {"short_name": "S1"}}]}returned S1 granules.providerpattern or a lowercase provider now return results. Before, they returned 0 hits.include_facets=v2that match more than one collection now return 400, the same as URL params. This includes provider-only queries.What areas of the application does this impact?
Required Checklist
Additional Checklist