Open-EO / openeo-opensearch-client

Simple opensearch client for openeo.
Apache License 2.0
0 stars 0 forks source link

Modify OpensearchClient getproducts behaviour #41

Closed jverrydt closed 3 months ago

jverrydt commented 4 months ago

The openeo OpensearchClient is used in gwc-geotrellis to query the oscars catalogue but for CGLOPS we have an issue when working with consolidations. These are often 4-5 global products for the same date but the opensearchclient is always returning the last published product which is not always the desired behaviour. https://github.com/Open-EO/openeo-opensearch-client/blob/755e7d118f454a0e77161edbf42013215fb62ed9/src/main/scala/org/openeo/opensearch/OpenSearchResponses.scala#L273

Can this default behaviour be adapted based on some flag that we pass. What we basically want is return the first match because we are applying some oscars filtering rules before.

https://jira.vito.be/browse/EP-4247

bossie commented 4 months ago

Note that gwc-geotrellis effectively only relies on the org.openeo.opensearch.backends.OscarsClient so to minimize the impact, it might be possible to just add an additional method to this class instead of adapting the org.openeo.opensearch.OpenSearchClient base class (TBC).

EmileSonneveld commented 4 months ago

@jverrydt Does that sound fine for you?

jverrydt commented 4 months ago

Sounds good!

EmileSonneveld commented 4 months ago

Added the parameter to OscarsClient. This PR makes use of it: https://git.vito.be/projects/BIGGEO/repos/gwc-geotrellis/pull-requests/17/overview