From 9ca673aab54aa2cf0872df9be07ea5552f9f26d7 Mon Sep 17 00:00:00 2001 From: David Bitner Date: Mon, 29 Apr 2024 20:58:14 -0500 Subject: [PATCH] adjust basicsql tests for change in paging links --- src/pgstac/tests/basic/cql2_searches.sql.out | 169 ++++++++++--------- src/pgstac/tests/basic/cql_searches.sql.out | 39 ++--- 2 files changed, 105 insertions(+), 103 deletions(-) diff --git a/src/pgstac/tests/basic/cql2_searches.sql.out b/src/pgstac/tests/basic/cql2_searches.sql.out index 9ec96e8c..cab8ee94 100644 --- a/src/pgstac/tests/basic/cql2_searches.sql.out +++ b/src/pgstac/tests/basic/cql2_searches.sql.out @@ -3,165 +3,166 @@ SET SET pgstac."default_filter_lang" TO 'cql2-json'; SET SELECT search('{"ids":["pgstac-test-item-0097"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"ids":["pgstac-test-item-0097","pgstac-test-item-0003"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"collections":["pgstac-test-collection"],"fields":{"include":["id"]}, "limit": 1}'); - {"next": "pgstac-test-collection:pgstac-test-item-0003", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0003", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} SELECT search('{"collections":["something"]}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"collections":["something"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"t_intersects", "args":[{"property":"datetime"},"2011-08-16T00:00:00Z/2011-08-17T00:00:00Z"]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"filter":{"op":"t_intersects", "args":[{"property":"datetime"},"2011-08-16T00:00:00Z/2011-08-17T00:00:00Z"]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"filter":{"op":"t_intersects", "args":[{"property":"datetime"},"2011-08-16T00:00:00Z/2011-08-17T00:00:00Z"]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"filter":{"op":"eq", "args":[{"property":"eo:cloud_cover"},36]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0087", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 36}}, {"id": "pgstac-test-item-0089", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 36}}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0087", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 36}}, {"id": "pgstac-test-item-0089", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 36}}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"filter":{"op":"lt", "args":[{"property":"eo:cloud_cover"},25]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"eo:cloud_cover","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0012", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 31, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0012", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 31, "numberReturned": 10} SELECT search('{"filter":{"op":"in","args":[{"property":"id"},["pgstac-test-item-0097"]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"filter":{"op":"in","args":[{"property":"id"},["pgstac-test-item-0097","pgstac-test-item-0003"]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"filter":{"op":"in","args":[{"property":"collection"},["pgstac-test-collection"]]},"fields":{"include":["id"]}, "limit": 1}'); - {"next": "pgstac-test-collection:pgstac-test-item-0003", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0003", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} SELECT search('{"filter":{"op":"in","args":[{"property":"collection"},["nonexistent"]]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"in","args":[{"property":"collection"},["nonexistent"]]}, "conf":{"context":"off"}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberReturned": 0} SELECT search('{"conf": {"nohydrate": true}, "limit": 2}'); - {"next": "pgstac-test-collection:pgstac-test-item-0002", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "bbox": [-85.379245, 30.933949, -85.308201, 31.003555], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.tif"}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008506_nw_16_1_20110825.txt"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.200.jpg"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.309412, 30.933949], [-85.308201, 31.002658], [-85.378084, 31.003555], [-85.379245, 30.934843], [-85.309412, 30.933949]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [654842, 3423507, 661516, 3431125], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7618, 6674], "eo:cloud_cover": 28, "proj:transform": [1, 0, 654842, 0, -1, 3431125, 0, 0, 1]}, "stac_extensions": ["eo", "projection"]}, {"id": "pgstac-test-item-0002", "bbox": [-85.504167, 30.934008, -85.433293, 31.003486], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008505_nw_16_1_20110825.tif"}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008505_nw_16_1_20110825.txt"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008505_nw_16_1_20110825.200.jpg"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.434414, 30.934008], [-85.433293, 31.002658], [-85.503096, 31.003486], [-85.504167, 30.934834], [-85.434414, 30.934008]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [642906, 3423339, 649572, 3430950], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7611, 6666], "eo:cloud_cover": 33, "proj:transform": [1, 0, 642906, 0, -1, 3430950, 0, 0, 1]}, "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0002", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0003", "bbox": [-85.379245, 30.933949, -85.308201, 31.003555], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.tif"}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008506_nw_16_1_20110825.txt"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.200.jpg"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.309412, 30.933949], [-85.308201, 31.002658], [-85.378084, 31.003555], [-85.379245, 30.934843], [-85.309412, 30.933949]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [654842, 3423507, 661516, 3431125], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7618, 6674], "eo:cloud_cover": 28, "proj:transform": [1, 0, 654842, 0, -1, 3431125, 0, 0, 1]}, "stac_extensions": ["eo", "projection"]}, {"id": "pgstac-test-item-0002", "bbox": [-85.504167, 30.934008, -85.433293, 31.003486], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008505_nw_16_1_20110825.tif"}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008505_nw_16_1_20110825.txt"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008505_nw_16_1_20110825.200.jpg"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.434414, 30.934008], [-85.433293, 31.002658], [-85.503096, 31.003486], [-85.504167, 30.934834], [-85.434414, 30.934008]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [642906, 3423339, 649572, 3430950], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7611, 6666], "eo:cloud_cover": 33, "proj:transform": [1, 0, 642906, 0, -1, 3430950, 0, 0, 1]}, "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 2} SELECT search('{"filter":{"op":"in","args":[{"property":"naip:state"},["zz","xx"]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0100", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0100", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"filter":{"op":"in","args":[{"property":"naip:year"},[2012,2013]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0100", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0100", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"filter":{"op":"a_equals","args":[{"property":"proj:bbox"},[654842, 3423507, 661516, 3431125]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"filter":{"op":"a_equals","args":[[654842, 3423507, 661516, 3431125],{"property":"proj:bbox"}]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"filter":{"op":"a_equals","args":[[654842, 3423507, 661516],{"property":"proj:bbox"}]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"a_overlaps","args":[{"property":"proj:bbox"},[654842, 3423507, 661516, 12345]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"filter":{"op":"a_overlaps","args":[{"property":"proj:bbox"},[12345]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"a_contains","args":[{"property":"proj:bbox"},[654842, 3423507, 661516]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"filter":{"op":"a_contains","args":[{"property":"proj:bbox"},[654842, 3423507, 661516, 12345]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"a_contained_by","args":[{"property":"proj:bbox"},[654842, 3423507, 661516]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"filter":{"op":"a_contained_by","args":[{"property":"proj:bbox"},[654842, 3423507, 661516, 3431125, 234324]]},"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} -- Test Paging SELECT search('{"fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0048", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0048", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"next:pgstac-test-item-0048", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": "pgstac-test-collection:pgstac-test-item-0054", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0054", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 5}}, {"id": "pgstac-test-item-0032", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0057", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0075", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 8}}, {"id": "pgstac-test-item-0049", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 9}}, {"id": "pgstac-test-item-0040", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 10}}, {"id": "pgstac-test-item-0036", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0039", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0052", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0054", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0054", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 5}}, {"id": "pgstac-test-item-0032", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0057", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0075", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 8}}, {"id": "pgstac-test-item-0049", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 9}}, {"id": "pgstac-test-item-0040", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 10}}, {"id": "pgstac-test-item-0036", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0039", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0052", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"next:pgstac-test-item-0016", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0053", "prev": "pgstac-test-collection:pgstac-test-item-0030", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0030", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0031", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0046", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0078", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 21}}, {"id": "pgstac-test-item-0051", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 22}}, {"id": "pgstac-test-item-0068", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 22}}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0088", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0053", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 24}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0053", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0030", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0030", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0031", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0046", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0078", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 21}}, {"id": "pgstac-test-item-0051", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 22}}, {"id": "pgstac-test-item-0068", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 22}}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0088", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0053", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 24}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"prev:pgstac-test-item-0030", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": "pgstac-test-collection:pgstac-test-item-0054", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0054", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 5}}, {"id": "pgstac-test-item-0032", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0057", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0075", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 8}}, {"id": "pgstac-test-item-0049", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 9}}, {"id": "pgstac-test-item-0040", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 10}}, {"id": "pgstac-test-item-0036", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0039", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0052", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0054", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0054", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 5}}, {"id": "pgstac-test-item-0032", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0057", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 7}}, {"id": "pgstac-test-item-0075", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 8}}, {"id": "pgstac-test-item-0049", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 9}}, {"id": "pgstac-test-item-0040", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 10}}, {"id": "pgstac-test-item-0036", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0039", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0052", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 12}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"prev:pgstac-test-item-0054", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0048", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0048", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 100, "numberReturned": 10} -- Test paging without fields extension SELECT jsonb_path_query(search('{"fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'), '$.features[*].id'); -"pgstac-test-item-0097" -"pgstac-test-item-0013" -"pgstac-test-item-0063" -"pgstac-test-item-0005" -"pgstac-test-item-0034" -"pgstac-test-item-0041" -"pgstac-test-item-0073" -"pgstac-test-item-0085" -"pgstac-test-item-0012" -"pgstac-test-item-0048" + "pgstac-test-item-0097" + "pgstac-test-item-0013" + "pgstac-test-item-0063" + "pgstac-test-item-0005" + "pgstac-test-item-0034" + "pgstac-test-item-0041" + "pgstac-test-item-0073" + "pgstac-test-item-0085" + "pgstac-test-item-0012" + "pgstac-test-item-0048" SELECT jsonb_path_query(search('{"token":"next:pgstac-test-item-0048","sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'), '$.features[*].id'); -"pgstac-test-item-0054" -"pgstac-test-item-0032" -"pgstac-test-item-0057" -"pgstac-test-item-0075" -"pgstac-test-item-0049" -"pgstac-test-item-0040" -"pgstac-test-item-0036" -"pgstac-test-item-0039" -"pgstac-test-item-0052" -"pgstac-test-item-0016" + "pgstac-test-item-0054" + "pgstac-test-item-0032" + "pgstac-test-item-0057" + "pgstac-test-item-0075" + "pgstac-test-item-0049" + "pgstac-test-item-0040" + "pgstac-test-item-0036" + "pgstac-test-item-0039" + "pgstac-test-item-0052" + "pgstac-test-item-0016" SELECT jsonb_path_query(search('{"token":"next:pgstac-test-item-0016","sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'), '$.features[*].id'); -"pgstac-test-item-0030" -"pgstac-test-item-0031" -"pgstac-test-item-0046" -"pgstac-test-item-0014" -"pgstac-test-item-0078" -"pgstac-test-item-0051" -"pgstac-test-item-0068" -"pgstac-test-item-0004" -"pgstac-test-item-0088" -"pgstac-test-item-0053" + "pgstac-test-item-0030" + "pgstac-test-item-0031" + "pgstac-test-item-0046" + "pgstac-test-item-0014" + "pgstac-test-item-0078" + "pgstac-test-item-0051" + "pgstac-test-item-0068" + "pgstac-test-item-0004" + "pgstac-test-item-0088" + "pgstac-test-item-0053" SELECT jsonb_path_query(search('{"token":"prev:pgstac-test-item-0030","sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'), '$.features[*].id'); -"pgstac-test-item-0054" -"pgstac-test-item-0032" -"pgstac-test-item-0057" -"pgstac-test-item-0075" -"pgstac-test-item-0049" -"pgstac-test-item-0040" -"pgstac-test-item-0036" -"pgstac-test-item-0039" -"pgstac-test-item-0052" -"pgstac-test-item-0016" + "pgstac-test-item-0054" + "pgstac-test-item-0032" + "pgstac-test-item-0057" + "pgstac-test-item-0075" + "pgstac-test-item-0049" + "pgstac-test-item-0040" + "pgstac-test-item-0036" + "pgstac-test-item-0039" + "pgstac-test-item-0052" + "pgstac-test-item-0016" SELECT jsonb_path_query(search('{"token":"prev:pgstac-test-item-0054","sortby":[{"field":"properties.eo:cloud_cover","direction":"asc"},{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'), '$.features[*].id'); -"pgstac-test-item-0097" -"pgstac-test-item-0013" -"pgstac-test-item-0063" -"pgstac-test-item-0005" -"pgstac-test-item-0034" -"pgstac-test-item-0041" -"pgstac-test-item-0073" -"pgstac-test-item-0085" -"pgstac-test-item-0012" -"pgstac-test-item-0048" + "pgstac-test-item-0097" + "pgstac-test-item-0013" + "pgstac-test-item-0063" + "pgstac-test-item-0005" + "pgstac-test-item-0034" + "pgstac-test-item-0041" + "pgstac-test-item-0073" + "pgstac-test-item-0085" + "pgstac-test-item-0012" + "pgstac-test-item-0048" SELECT search('{"collections": ["pgstac-test-collection"], "limit": 1}'); -{"next": "pgstac-test-collection:pgstac-test-item-0003", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "bbox": [-85.379245, 30.933949, -85.308201, 31.003555], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.tif", "type": "image/tiff; application=geotiff; profile=cloud-optimized", "roles": ["data"], "title": "RGBIR COG tile", "eo:bands": [{"name": "Red", "common_name": "red"}, {"name": "Green", "common_name": "green"}, {"name": "Blue", "common_name": "blue"}, {"name": "NIR", "common_name": "nir", "description": "near-infrared"}]}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008506_nw_16_1_20110825.txt", "type": "text/plain", "roles": ["metadata"], "title": "FGDC Metdata"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.200.jpg", "type": "image/jpeg", "roles": ["thumbnail"], "title": "Thumbnail"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.309412, 30.933949], [-85.308201, 31.002658], [-85.378084, 31.003555], [-85.379245, 30.934843], [-85.309412, 30.933949]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [654842, 3423507, 661516, 3431125], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7618, 6674], "eo:cloud_cover": 28, "proj:transform": [1, 0, 654842, 0, -1, 3431125, 0, 0, 1]}, "stac_version": "1.0.0-beta.2", "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0003", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0003", "bbox": [-85.379245, 30.933949, -85.308201, 31.003555], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.tif", "type": "image/tiff; application=geotiff; profile=cloud-optimized", "roles": ["data"], "title": "RGBIR COG tile", "eo:bands": [{"name": "Red", "common_name": "red"}, {"name": "Green", "common_name": "green"}, {"name": "Blue", "common_name": "blue"}, {"name": "NIR", "common_name": "nir", "description": "near-infrared"}]}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30085/m_3008506_nw_16_1_20110825.txt", "type": "text/plain", "roles": ["metadata"], "title": "FGDC Metdata"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30085/m_3008506_nw_16_1_20110825.200.jpg", "type": "image/jpeg", "roles": ["thumbnail"], "title": "Thumbnail"}}, "geometry": {"type": "Polygon", "coordinates": [[[-85.309412, 30.933949], [-85.308201, 31.002658], [-85.378084, 31.003555], [-85.379245, 30.934843], [-85.309412, 30.933949]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-25T00:00:00Z", "naip:year": "2011", "proj:bbox": [654842, 3423507, 661516, 3431125], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7618, 6674], "eo:cloud_cover": 28, "proj:transform": [1, 0, 654842, 0, -1, 3431125, 0, 0, 1]}, "stac_version": "1.0.0-beta.2", "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 1} SELECT search('{"collections": ["pgstac-test-collection"], "limit": 1, "token": "next:pgstac-test-item-0001"}'); -{"next": "pgstac-test-collection:pgstac-test-item-0006", "prev": "pgstac-test-collection:pgstac-test-item-0006", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0006", "bbox": [-87.253322, 30.934677, -87.184223, 31.00282], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30087/m_3008707_nw_16_1_20110824.tif", "type": "image/tiff; application=geotiff; profile=cloud-optimized", "roles": ["data"], "title": "RGBIR COG tile", "eo:bands": [{"name": "Red", "common_name": "red"}, {"name": "Green", "common_name": "green"}, {"name": "Blue", "common_name": "blue"}, {"name": "NIR", "common_name": "nir", "description": "near-infrared"}]}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30087/m_3008707_nw_16_1_20110824.txt", "type": "text/plain", "roles": ["metadata"], "title": "FGDC Metdata"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30087/m_3008707_nw_16_1_20110824.200.jpg", "type": "image/jpeg", "roles": ["thumbnail"], "title": "Thumbnail"}}, "geometry": {"type": "Polygon", "coordinates": [[[-87.184223, 30.934794], [-87.184354, 31.00282], [-87.253322, 31.002703], [-87.253142, 30.934677], [-87.184223, 30.934794]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-24T00:00:00Z", "naip:year": "2011", "proj:bbox": [475817, 3422390, 482401, 3429929], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7539, 6584], "eo:cloud_cover": 100, "proj:transform": [1, 0, 475817, 0, -1, 3429929, 0, 0, 1]}, "stac_version": "1.0.0-beta.2", "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0006", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0006", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0006", "bbox": [-87.253322, 30.934677, -87.184223, 31.00282], "type": "Feature", "links": [], "assets": {"image": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30087/m_3008707_nw_16_1_20110824.tif", "type": "image/tiff; application=geotiff; profile=cloud-optimized", "roles": ["data"], "title": "RGBIR COG tile", "eo:bands": [{"name": "Red", "common_name": "red"}, {"name": "Green", "common_name": "green"}, {"name": "Blue", "common_name": "blue"}, {"name": "NIR", "common_name": "nir", "description": "near-infrared"}]}, "metadata": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_fgdc_2011/30087/m_3008707_nw_16_1_20110824.txt", "type": "text/plain", "roles": ["metadata"], "title": "FGDC Metdata"}, "thumbnail": {"href": "https://naipeuwest.blob.core.windows.net/naip/v002/al/2011/al_100cm_2011/30087/m_3008707_nw_16_1_20110824.200.jpg", "type": "image/jpeg", "roles": ["thumbnail"], "title": "Thumbnail"}}, "geometry": {"type": "Polygon", "coordinates": [[[-87.184223, 30.934794], [-87.184354, 31.00282], [-87.253322, 31.002703], [-87.253142, 30.934677], [-87.184223, 30.934794]]]}, "collection": "pgstac-test-collection", "properties": {"gsd": 1, "datetime": "2011-08-24T00:00:00Z", "naip:year": "2011", "proj:bbox": [475817, 3422390, 482401, 3429929], "proj:epsg": 26916, "providers": [{"url": "https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/", "name": "USDA Farm Service Agency", "roles": ["producer", "licensor"]}], "naip:state": "al", "proj:shape": [7539, 6584], "eo:cloud_cover": 100, "proj:transform": [1, 0, 475817, 0, -1, 3429929, 0, 0, 1]}, "stac_version": "1.0.0-beta.2", "stac_extensions": ["eo", "projection"]}], "numberMatched": 100, "numberReturned": 1} + diff --git a/src/pgstac/tests/basic/cql_searches.sql.out b/src/pgstac/tests/basic/cql_searches.sql.out index 32ac24cf..3db697a0 100644 --- a/src/pgstac/tests/basic/cql_searches.sql.out +++ b/src/pgstac/tests/basic/cql_searches.sql.out @@ -1,60 +1,60 @@ SET pgstac."default_filter_lang" TO 'cql-json'; SET SELECT search('{"fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0010", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0001", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 89}}, {"id": "pgstac-test-item-0002", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 33}}, {"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 28}}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0006", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 100}}, {"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0010", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0001", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 89}}, {"id": "pgstac-test-item-0002", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 33}}, {"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-25T00:00:00Z", "eo:cloud_cover": 28}}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 23}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0006", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 100}}, {"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 64}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 61}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 31}}], "numberMatched": 100, "numberReturned": 10} -- Test Paging SELECT search('{"fields":{"include":["id"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0010", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0001", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0002", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0006", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0010", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0001", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0002", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0004", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0006", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"next:pgstac-test-item-0010", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0020", "prev": "pgstac-test-collection:pgstac-test-item-0011", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0020", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0011", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"next:pgstac-test-item-0020", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0030", "prev": "pgstac-test-collection:pgstac-test-item-0021", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0021", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0022", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 84}}, {"id": "pgstac-test-item-0023", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 56}}, {"id": "pgstac-test-item-0024", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 58}}, {"id": "pgstac-test-item-0025", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 65}}, {"id": "pgstac-test-item-0026", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0027", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 43}}, {"id": "pgstac-test-item-0028", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 46}}, {"id": "pgstac-test-item-0029", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 42}}, {"id": "pgstac-test-item-0030", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0030", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0021", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0021", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0022", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 84}}, {"id": "pgstac-test-item-0023", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 56}}, {"id": "pgstac-test-item-0024", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 58}}, {"id": "pgstac-test-item-0025", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 65}}, {"id": "pgstac-test-item-0026", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0027", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 43}}, {"id": "pgstac-test-item-0028", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 46}}, {"id": "pgstac-test-item-0029", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 42}}, {"id": "pgstac-test-item-0030", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 16}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"prev:pgstac-test-item-0021", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0020", "prev": "pgstac-test-collection:pgstac-test-item-0011", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0020", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0011", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 41}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}], "numberMatched": 100, "numberReturned": 10} SELECT search('{"token":"next:pgstac-test-item-0011", "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0021", "prev": "pgstac-test-collection:pgstac-test-item-0012", "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}, {"id": "pgstac-test-item-0021", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}], "numberMatched": 100, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0021", "type": "application/geo+json", "method": "GET"}, {"rel": "prev", "href": "./search?token=prev:pgstac-test-collection:pgstac-test-item-0012", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 17}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 54}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 13}}, {"id": "pgstac-test-item-0017", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 59}}, {"id": "pgstac-test-item-0018", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}, {"id": "pgstac-test-item-0019", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 52}}, {"id": "pgstac-test-item-0020", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 39}}, {"id": "pgstac-test-item-0021", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 29}}], "numberMatched": 100, "numberReturned": 10} -- SELECT search('{"datetime":"2011-08-16T00:00:00Z/2011-08-17T00:00:00Z", "fields":{"include":["id","properties.datetime"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"datetime":["2011-08-16T00:00:00Z","2011-08-17T00:00:00Z"], "fields":{"include":["id","properties.datetime"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"filter":{"anyinteracts":[{"property":"datetime"},["2011-08-16T00:00:00Z","2011-08-17T00:00:00Z"]]}, "fields":{"include":["id","properties.datetime"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0016", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0016", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0007", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0008", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0009", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0010", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0011", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z"}}, {"id": "pgstac-test-item-0014", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0015", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}, {"id": "pgstac-test-item-0016", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z"}}], "numberMatched": 57, "numberReturned": 10} SELECT search('{"filter":{"eq":[{"property":"eo:cloud_cover"},36]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"datetime","direction":"desc"},{"field":"id","direction":"asc"}]}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0087", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 36}}, {"id": "pgstac-test-item-0089", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 36}}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0087", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 36}}, {"id": "pgstac-test-item-0089", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 36}}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"filter":{"lt":[{"property":"eo:cloud_cover"},25]}, "fields":{"include":["id","properties.datetime","properties.eo:cloud_cover"]},"sortby":[{"field":"eo:cloud_cover","direction":"asc"}]}'); - {"next": "pgstac-test-collection:pgstac-test-item-0012", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 31, "numberReturned": 10} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0012", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-07-31T00:00:00Z", "eo:cloud_cover": 1}}, {"id": "pgstac-test-item-0063", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0013", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 2}}, {"id": "pgstac-test-item-0085", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-01T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0073", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-15T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0041", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0034", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0005", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-24T00:00:00Z", "eo:cloud_cover": 3}}, {"id": "pgstac-test-item-0048", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-16T00:00:00Z", "eo:cloud_cover": 4}}, {"id": "pgstac-test-item-0012", "collection": "pgstac-test-collection", "properties": {"datetime": "2011-08-17T00:00:00Z", "eo:cloud_cover": 4}}], "numberMatched": 31, "numberReturned": 10} SELECT search('{"ids":["pgstac-test-item-0097"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 1, "numberReturned": 1} SELECT search('{"ids":["pgstac-test-item-0097","pgstac-test-item-0003"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}, {"id": "pgstac-test-item-0097", "collection": "pgstac-test-collection"}], "numberMatched": 2, "numberReturned": 2} SELECT search('{"ids":["bogusid"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"collections":["pgstac-test-collection"],"fields":{"include":["id"]}, "limit": 1}'); - {"next": "pgstac-test-collection:pgstac-test-item-0003", "prev": null, "type": "FeatureCollection", "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}, {"rel": "next", "href": "./search?token=next:pgstac-test-collection:pgstac-test-item-0003", "type": "application/geo+json", "method": "GET"}], "features": [{"id": "pgstac-test-item-0003", "collection": "pgstac-test-collection"}], "numberMatched": 100, "numberReturned": 1} SELECT search('{"collections":["something"]}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT search('{"collections":["something"],"fields":{"include":["id"]}}'); - {"next": null, "prev": null, "type": "FeatureCollection", "features": [], "numberMatched": 0, "numberReturned": 0} + {"type": "FeatureCollection", "links": [{"rel": "root", "href": ".", "type": "application/json"}, {"rel": "self", "href": "./search", "type": "application/json"}], "features": [], "numberMatched": 0, "numberReturned": 0} SELECT usecount IS NOT NULL and usecount > 0 AND lastused IS NOT NULL AND lastused < clock_timestamp() FROM search_query(jsonb_build_object('collections',ARRAY[random()::text])); -t + t SELECT hash, search, _where, orderby, metadata from search_query('{"collections":["pgstac-test-collection"]}'::jsonb, _metadata=>'{"meta":"value"}'::jsonb); 06efe6c09f0d61fd212e882325041a73 | {"collections": ["pgstac-test-collection"]} | collection = ANY ('{pgstac-test-collection}') | datetime DESC, id DESC | {"meta": "value"} @@ -63,4 +63,5 @@ SELECT hash, search, _where, orderby, metadata from search_query('{"collections" 06efe6c09f0d61fd212e882325041a73 | {"collections": ["pgstac-test-collection"]} | collection = ANY ('{pgstac-test-collection}') | datetime DESC, id DESC | {"meta": "value"} SELECT usecount IS NOT NULL and usecount > 0 AND lastused IS NOT NULL AND lastused < clock_timestamp() FROM search_query('{"collections":["pgstac-test-collection"]}'); -t + t +