Skip to content

Commit

Permalink
Add support for t2:product_type in OpenSearchableSupplier
Browse files Browse the repository at this point in the history
ESACPE-1862
  • Loading branch information
emmanuelmathot committed Feb 19, 2024
1 parent 43ee06e commit 1a1ae75
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"filter-lang": "cql2-json",
"filter": {
"op": "=",
"args": [
{
"property": "t2:product_type"
},
"S2MSI2A"
]
},
"result": {
"{http://a9.com/-/opensearch/extensions/eo/1.0/}productType": "S2MSI2A"
}
}
9 changes: 9 additions & 0 deletions src/Stars.Data/Suppliers/OpenSearchableSupplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ private void FillParametersFromIsInListPredicate(IsInListPredicate isInListPredi
case "collection":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}parentIdentifier", "{" + string.Join(",", values) + "}");
return;
case "t2:product_type":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}productType", "{" + string.Join(",", values) + "}");
return;
case "keywords":
parameters.Set("{http://purl.org/dc/terms/}subject", "{" + string.Join(",", values) + "}");
return;
Expand Down Expand Up @@ -506,6 +509,9 @@ private void FillParametersFromIsLikePredicate(IsLikePredicate isLikePredicate,
case "keywords":
parameters.Set("{http://purl.org/dc/terms/}subject", value);
return;
case "t2:product_type":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}productType", value);
return;
case "eo:cloud_cover":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}cloudCover", value);
return;
Expand Down Expand Up @@ -553,6 +559,9 @@ private void FillParametersFromBinaryComparisonPredicate(BinaryComparisonPredica
case "collection":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}parentIdentifier", ValueToNumberSetOrInterval(value.ToString(), binaryComparisonPredicate.Op));
return;
case "t2:product_type":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}productType", ValueToNumberSetOrInterval(value.ToString(), binaryComparisonPredicate.Op));
return;
case "eo:cloud_cover":
parameters.Set("{http://a9.com/-/opensearch/extensions/eo/1.0/}cloudCover", ValueToNumberSetOrInterval(value.ToString(), binaryComparisonPredicate.Op));
return;
Expand Down

0 comments on commit 1a1ae75

Please sign in to comment.