diff --git a/pygeoapi/provider/elasticsearch_.py b/pygeoapi/provider/elasticsearch_.py index cd4eb2d..c01622a 100644 --- a/pygeoapi/provider/elasticsearch_.py +++ b/pygeoapi/provider/elasticsearch_.py @@ -146,6 +146,8 @@ class ElasticsearchProvider(BaseProvider): fields_[k] = {'type': 'string'} elif v['type'] == 'date': fields_[k] = {'type': 'string', 'format': 'date'} + elif v['type'] == 'float': + fields_[k] = {'type': 'number', 'format': v['type']} else: fields_[k] = {'type': v['type']} diff --git a/tests/cite/ogcapi-features/README.md b/tests/cite/ogcapi-features/README.md index a0bf4c3..90d4671 100644 --- a/tests/cite/ogcapi-features/README.md +++ b/tests/cite/ogcapi-features/README.md @@ -3,7 +3,7 @@ ## Test data Test data used is a subset of the [Canadian National Water Data Archive](https://www.canada.ca/en/environment-climate-change/services/water-overview/quantity/monitoring/survey/data-products-services/national-archive-hydat.html) -as extracted from the [MSC Geomet OGC API](https://eccc-msc.github.io/open-data/msc-geomet/web-services_en/#ogc-api-features) service. +as extracted from the [MSC GeoMet OGC API](https://eccc-msc.github.io/open-data/msc-geomet/web-services_en/#ogc-api-features) service. ## Running diff --git a/tests/test_elasticsearch__provider.py b/tests/test_elasticsearch__provider.py index d720543..c789247 100644 --- a/tests/test_elasticsearch__provider.py +++ b/tests/test_elasticsearch__provider.py @@ -150,7 +150,8 @@ def test_query(config): fields = p.get_fields() assert len(fields) == 37 assert fields['scalerank']['type'] == 'long' - assert fields['changed']['type'] == 'float' + assert fields['changed']['type'] == 'number' + assert fields['changed']['format'] == 'float' assert fields['ls_name']['type'] == 'string' results = p.query()