diff --git a/wis2box-management/wis2box/api/backend/elastic.py b/wis2box-management/wis2box/api/backend/elastic.py index 0b6ab4bf8..48e51c4c9 100644 --- a/wis2box-management/wis2box/api/backend/elastic.py +++ b/wis2box-management/wis2box/api/backend/elastic.py @@ -116,12 +116,20 @@ 'raw': {'type': 'keyword'} } }, - 'observationTime': { + 'reportTime': { 'type': 'date', 'fields': { 'raw': {'type': 'keyword'} } }, + 'reportId': { + 'type': 'text', + 'fields': { + 'raw': { + 'type': 'keyword' + } + } + }, 'phenomenonTime': { 'type': 'text' }, @@ -141,14 +149,6 @@ 'description': { 'type': 'text' }, - 'reportId': { - 'type': 'text', - 'fields': { - 'raw': { - 'type': 'keyword' - } - } - }, } } } diff --git a/wis2box-management/wis2box/data/bufr2geojson.py b/wis2box-management/wis2box/data/bufr2geojson.py index 0858c374d..676ace640 100644 --- a/wis2box-management/wis2box/data/bufr2geojson.py +++ b/wis2box-management/wis2box/data/bufr2geojson.py @@ -70,7 +70,7 @@ def transform(self, input_data: Union[Path, bytes], for item in result['items']: id = item['id'] - data_date = item['properties']['resultTime'] + data_date = item['properties']['reportTime'] self.output_data[id] = { '_meta': { 'identifier': id, diff --git a/wis2box-management/wis2box/data/geojson.py b/wis2box-management/wis2box/data/geojson.py index a9df7b62a..008635d89 100644 --- a/wis2box-management/wis2box/data/geojson.py +++ b/wis2box-management/wis2box/data/geojson.py @@ -39,7 +39,7 @@ def transform(self, input_data: Union[Path, bytes], LOGGER.debug('Procesing GeoJSON data') data_ = json.loads(input_data) identifier = data_['id'] - data_date = data_['properties']['resultTime'] + data_date = data_['properties']['reportTime'] self.output_data[identifier] = { '_meta': { 'identifier': identifier,