Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SearchAPI/CMR/Output/jsonlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def req_fields_jsonlite():
'azimuthAnxTime',
'samplesPerBurst',
'subswath',
'pgeVersion'
'pgeVersion',
'operaBurstID',
]
return fields

Expand Down Expand Up @@ -176,4 +177,9 @@ def getItem(self, p):

result['burst'] = burst

if p.get('operaBurstID') is not None:
result['opera'] = {
'operaBurstID': p.get('operaBurstID')
}

return result
3 changes: 3 additions & 0 deletions SearchAPI/CMR/Output/jsonlite2.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ def getItem(self, p):
if p.get('burst') is not None: # is a burst product
result['s1b'] = p['burst']

if p.get('opera') is not None:
result['s1o'] = p['opera']

return result
3 changes: 3 additions & 0 deletions SearchAPI/CMR/Translate/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@ def get_field_paths():
'azimuthAnxTime': attr_path('AZIMUTH_ANX_TIME'),
'samplesPerBurst': attr_path('SAMPLES_PER_BURST'),
'subswath': attr_path('SUBSWATH_NAME'),

# OPERA RTC FIELDS
'operaBurstID': attr_path('OPERA_BURST_ID'),
}
return paths
3 changes: 2 additions & 1 deletion SearchAPI/CMR/Translate/input_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def input_map():
'collections': ['echo_collection_id[]', '{0}', parse_string_list],
'relativeburstid': ['attribute[]', 'int,BURST_ID_RELATIVE,{0}', parse_int_list],
'absoluteburstid': ['attribute[]', 'int,BURST_ID_ABSOLUTE,{0}', parse_int_list],
'fullburstid': ['attribute[]', 'string,BURST_ID_FULL,{0}', parse_string_list]
'fullburstid': ['attribute[]', 'string,BURST_ID_FULL,{0}', parse_string_list],
'operaburstid': ['attribute[]', 'string,OPERA_BURST_ID,{0}', parse_string_list]
}

return parameter_map
9 changes: 6 additions & 3 deletions SearchAPI/SearchQuery.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ def can_use_cmr(self):

def check_has_search_params(self):
non_searchable_param = ['output', 'maxresults', 'pagesize', 'maturity']
list_param_exceptions = ['collections']
list_param_exceptions = ['collections'] # allows collections in granule/product search

params = [v.lower() for v in self.request.local_values]
is_collection_search = 'collections' in params

searchables = [
v for v in self.request.local_values if v.lower() not in [*non_searchable_param, *list_param_exceptions]
v for v in params if v not in [*non_searchable_param, *list_param_exceptions]
]

if len(searchables) <= 0:
if len(searchables) <= 0 and not is_collection_search:
raise ValueError(
'No searchable parameters specified, queries must include'
' parameters besides output= and maxresults='
Expand Down