Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PRIP] Support “and”, “or”, “not”, “in” operators #1069

Closed
8 of 9 tasks
Woljtek opened this issue Aug 8, 2023 · 15 comments
Closed
8 of 9 tasks

[PRIP] Support “and”, “or”, “not”, “in” operators #1069

Woljtek opened this issue Aug 8, 2023 · 15 comments
Assignees
Labels
enhancement New feature or request Phase2 WERUM dev Ticket dedicated to WERUM development

Comments

@Woljtek
Copy link

Woljtek commented Aug 8, 2023

User story description: "As a end user, I would like to use “and”, “or”, “not”, “in” operators on PRIP/DDIP filter queries so that I can combine different filter functions."

Definition of ready:

  • Production-Common V1.14.0 is delivered
  • Production Interface Delivery Point Specification ICD v1.9 is diffused (ESA-EOPG-EOPGC-IF-3) by ESA
  • A pull request from "develop" branch is created for the implemenation of this US in Production-Common

Acceptance criteria:

  • Test with "and" operator (https://$DDIP_URL/odata/v1/Products?$filter=startswith(Name,'S1') and endswith(Name,'.EOF.zip'))
  • Test with "or" operator (https://$DDIP_URL/odata/v1/Products?$filter=contains(Name,'S1_RAW__0S') or contains(Name,'S2_RAW__0S'))
  • Test "not" operator (https://$DDIP_URL/odata/v1/Products?$filter=startswith(Name,'S1') and not contains(Name,'WV_SLC__1'))
  • Test 'eq' operator (https://$DDIP_URL/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name eq 'productType' and att/OData.CSC.StringAttribute/Value in ('AUX_WAV','AUX_ICE','AUX_WND')))

Note : Tests can be done directly on OPS plateform (see #1071 / #1072)

Definition of Done:

  • Acceptance criteria are full filled
  • Pull-request is reviewed by rs-ops team
@Woljtek Woljtek added enhancement New feature or request Phase2 WERUM dev Ticket dedicated to WERUM development labels Aug 8, 2023
@w-bc w-bc self-assigned this Aug 31, 2023
@w-bc
Copy link

w-bc commented Sep 5, 2023

Tested on Werum testing environment:

AND
curl -XGET "http://localhost:8080/odata/v1/Products?\$filter=startswith(Name,'S1B')%20and%20endswith(Name,'025A63_28CD.SAFE.zip')"

{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "1b12ce8a-3342-48f5-8b7a-671895734e0e",
      "Name": "S1B_EW_GRDM_1ADH_20200120T164203_20200120T164231_019903_025A63_28CD.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 10950,
      "PublicationDate": "2023-09-05T11:42:00.546Z",
      "EvictionDate": "2023-09-12T11:42:00.546Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "9af4674c2890a4541accc9c7adb09680",
          "ChecksumDate": "2023-09-05T11:31:46Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T16:42:03Z",
        "End": "2020-01-20T16:42:31Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.3129,
              -11.3875
            ],
            [
              -70.9109,
              -11.3875
            ],
            [
              -70.9109,
              -14.8974
            ],
            [
              -75.3129,
              -14.937
            ],
            [
              -75.3129,
              -11.3875
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}

@w-bc w-bc closed this as completed Sep 5, 2023
@w-bc w-bc reopened this Sep 5, 2023
@w-bc
Copy link

w-bc commented Sep 5, 2023

Tested on Werum testing environment:

OR
curl -XGET "http://localhost:8080/odata/v1/Products?\$filter=contains(Name,'EW_GRDM_1A')%20or%20contains(Name,'WV_RAW__0C')&\$top=3"

{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "d134b19e-9b46-4fa5-ad22-d88b058c0be9",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190011_20200120T190119_030888_038B84_F52A.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 10952,
      "PublicationDate": "2023-09-05T11:21:19.358Z",
      "EvictionDate": "2023-09-12T11:21:19.358Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "4abd01c67a7dba1e66ca5ad478a26191",
          "ChecksumDate": "2023-09-05T11:21:19Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T19:00:11Z",
        "End": "2020-01-20T19:01:19.2Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -49.5689,
              -11.3875
            ],
            [
              -14.3129,
              -11.3875
            ],
            [
              -14.3129,
              -14.3875
            ],
            [
              -49.5689,
              -14.7051
            ],
            [
              -49.5689,
              -11.3875
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "7e22e1cf-46b6-4a0e-9bae-5123be590b5a",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190111_20200120T190209_030888_038B84_142F.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 10955,
      "PublicationDate": "2023-09-05T11:21:53.467Z",
      "EvictionDate": "2023-09-12T11:21:53.467Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "6d56a5ac8583a1fa1b39cbb5ffc28a36",
          "ChecksumDate": "2023-09-05T11:21:53Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T19:01:11Z",
        "End": "2020-01-20T19:02:09Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.3129,
              -11.3875
            ],
            [
              -45.3299,
              -11.3875
            ],
            [
              -45.3299,
              -14.6669
            ],
            [
              -75.3129,
              -14.937
            ],
            [
              -75.3129,
              -11.3875
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "e767fdfe-7c8a-466d-a6fc-fbc2472071a7",
      "Name": "S1A_WV_RAW__0CSV_20200120T114913_20200120T121043_030883_038B58_5E83.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3306,
      "PublicationDate": "2023-09-05T11:23:51.21Z",
      "EvictionDate": "2023-09-12T11:23:51.21Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "8d00766c59260c6045eabb24ab326365",
          "ChecksumDate": "2023-09-05T11:23:51Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T11:49:13Z",
        "End": "2020-01-20T12:10:43Z"
      },
      "GeoFootprint": {
        "type": "LineString",
        "coordinates": [
          [
            38.0143,
            -2.1312
          ],
          [
            36.9218,
            3.0021
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}

@w-bc
Copy link

w-bc commented Sep 5, 2023

Tested on Werum testing environment:

NOT
curl -XGET "http://localhost:8080/odata/v1/Products?\$filter=startswith(Name,'S1A')%20and%20not%20contains(Name,'WV_RAW__0C')"|jq .|grep Name

      "Name": "S1A_GP_RAW__0____20200120T130445_20200120T185858_030884________D4F0.SAFE.zip",
      "Name": "S1A_HK_RAW__0____20200120T185933_20200120T185938_030888________C7A6.SAFE.zip",
      "Name": "S1A_GP_RAW__0____20200120T070406_20200120T131925_030880________ADFE.SAFE.zip",
      "Name": "S1A_HK_RAW__0____20200120T131929_20200120T131933_030884________E075.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T190011_20200120T190119_030888_038B84_0661.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T190111_20200120T190209_030888_038B84_6ECE.SAFE.zip",
      "Name": "S1A_EW_RAW__0CDH_20200120T190011_20200120T190209_030888_038B84_7169.SAFE.zip",
      "Name": "S1A_EW_RAW__0NDH_20200120T190011_20200120T190209_030888_038B84_E010.SAFE.zip",
      "Name": "S1A_EW_RAW__0ADH_20200120T190011_20200120T190209_030888_038B84_DAB9.SAFE.zip",
      "Name": "S1A_S6_RAW__0SSV_20200120T184828_20200120T184848_030888_038B81_1BA9.SAFE.zip",
      "Name": "S1A_S6_RAW__0CSV_20200120T184828_20200120T184848_030888_038B81_3BB3.SAFE.zip",
      "Name": "S1A_S6_RAW__0NSV_20200120T184828_20200120T184848_030888_038B81_B9E5.SAFE.zip",
      "Name": "S1A_S6_RAW__0ASV_20200120T184828_20200120T184848_030888_038B81_D28D.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124746_20200120T124818_030884_038B5E_087D.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124811_20200120T124843_030884_038B5E_38AF.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124836_20200120T124908_030884_038B5E_070A.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124901_20200120T124933_030884_038B5E_FDA4.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124926_20200120T124958_030884_038B5E_8564.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T124951_20200120T125023_030884_038B5E_6991.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T125016_20200120T125048_030884_038B5E_D9F4.SAFE.zip",
      "Name": "S1A_IW_RAW__0SDV_20200120T125041_20200120T125111_030884_038B5E_092B.SAFE.zip",
      "Name": "S1A_IW_RAW__0CDV_20200120T124746_20200120T125111_030884_038B5E_C5AD.SAFE.zip",
      "Name": "S1A_IW_RAW__0NDV_20200120T124746_20200120T125111_030884_038B5E_1DFE.SAFE.zip",
      "Name": "S1A_IW_RAW__0ADV_20200120T124746_20200120T125111_030884_038B5E_AE70.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T190011_20200120T190119_030888_038B84_9862.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190011_20200120T190119_030888_038B84_F52A.SAFE.zip",
      "Name": "S1A_S6_SLC__1SSV_20200120T184828_20200120T184848_030888_038B81_D8E3.SAFE.zip",
      "Name": "S1A_S6_GRDH_1SSV_20200120T184828_20200120T184848_030888_038B81_6097.SAFE.zip",
      "Name": "S1A_S6_GRDH_1ASV_20200120T184828_20200120T184848_030888_038B81_48A0.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123336_20200120T123444_030884_038B5C_F74C.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123436_20200120T123544_030884_038B5C_2F02.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123536_20200120T123644_030884_038B5C_A65D.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123636_20200120T123744_030884_038B5C_38CF.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123736_20200120T123844_030884_038B5C_2CF2.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123836_20200120T123944_030884_038B5C_91FD.SAFE.zip",
      "Name": "S1A_EW_RAW__0SDH_20200120T123936_20200120T124032_030884_038B5C_7EFF.SAFE.zip",
      "Name": "S1A_EW_RAW__0CDH_20200120T123336_20200120T124032_030884_038B5C_CC44.SAFE.zip",
      "Name": "S1A_EW_RAW__0NDH_20200120T123336_20200120T124032_030884_038B5C_02F5.SAFE.zip",
      "Name": "S1A_EW_RAW__0ADH_20200120T123336_20200120T124032_030884_038B5C_20C8.SAFE.zip",
      "Name": "S1A_RF_RAW__0SDH_20200120T123137_20200120T123138_030884_038B5A_1727.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T190111_20200120T190209_030888_038B84_7B53.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190111_20200120T190209_030888_038B84_142F.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124901_20200120T124933_030884_038B5E_9077.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124901_20200120T124933_030884_038B5E_EBBD.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124901_20200120T124933_030884_038B5E_0200.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124901_20200120T124933_030884_038B5E_FB7A.SAFE.zip",
      "Name": "S1A_RF_RAW__0SDH_20200120T123147_20200120T123148_030884_038B5A_D2FF.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124926_20200120T124958_030884_038B5E_6806.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124926_20200120T124958_030884_038B5E_6A3F.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124926_20200120T124958_030884_038B5E_3B53.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124926_20200120T124958_030884_038B5E_4EC8.SAFE.zip",
      "Name": "S1A_RF_RAW__0SDV_20200120T123157_20200120T123158_030884_038B5B_E1F6.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124951_20200120T125023_030884_038B5E_EF44.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124951_20200120T125023_030884_038B5E_AE55.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124951_20200120T125023_030884_038B5E_3F3C.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124951_20200120T125023_030884_038B5E_8E82.SAFE.zip",
      "Name": "S1A_RF_RAW__0SDV_20200120T123207_20200120T123208_030884_038B5B_98DF.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T125016_20200120T125048_030884_038B5E_CDA0.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T125016_20200120T125048_030884_038B5E_8EF5.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T125016_20200120T125048_030884_038B5E_593B.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T125016_20200120T125048_030884_038B5E_C5C3.SAFE.zip",
      "Name": "S1A_WV_RAW__0SSV_20200120T114913_20200120T121043_030883_038B58_EA3C.SAFE.zip",
      "Name": "S1A_WV_RAW__0NSV_20200120T114913_20200120T121043_030883_038B58_C0F6.SAFE.zip",
      "Name": "S1A_WV_RAW__0ASV_20200120T114913_20200120T121043_030883_038B58_17BD.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T125041_20200120T125111_030884_038B5E_C590.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T125041_20200120T125111_030884_038B5E_9C0E.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T125041_20200120T125111_030884_038B5E_B188.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T125041_20200120T125111_030884_038B5E_0BFF.SAFE.zip",
      "Name": "S1A_WV_RAW__0SSV_20200120T124037_20200120T124728_030884_038B5D_8E44.SAFE.zip",
      "Name": "S1A_WV_RAW__0NSV_20200120T124037_20200120T124728_030884_038B5D_EE6B.SAFE.zip",
      "Name": "S1A_WV_RAW__0ASV_20200120T124037_20200120T124728_030884_038B5D_16AC.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124746_20200120T124818_030884_038B5E_5E36.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124746_20200120T124818_030884_038B5E_A4E8.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124746_20200120T124818_030884_038B5E_B80B.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124746_20200120T124818_030884_038B5E_F46E.SAFE.zip",
      "Name": "S1A_WV_RAW__0SSV_20200120T125202_20200120T131727_030884_038B5F_1C26.SAFE.zip",
      "Name": "S1A_WV_RAW__0NSV_20200120T125202_20200120T131727_030884_038B5F_5364.SAFE.zip",
      "Name": "S1A_WV_RAW__0ASV_20200120T125202_20200120T131727_030884_038B5F_2F36.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124811_20200120T124843_030884_038B5E_A3AE.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124811_20200120T124843_030884_038B5E_14FA.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124811_20200120T124843_030884_038B5E_E29D.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124811_20200120T124843_030884_038B5E_565A.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123536_20200120T123644_030884_038B5C_FCD9.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123536_20200120T123644_030884_038B5C_C033.SAFE.zip",
      "Name": "S1A_IW_SLC__1SDV_20200120T124836_20200120T124908_030884_038B5E_AE14.SAFE.zip",
      "Name": "S1A_IW_SLC__1ADV_20200120T124836_20200120T124908_030884_038B5E_7EAB.SAFE.zip",
      "Name": "S1A_IW_GRDH_1SDV_20200120T124836_20200120T124908_030884_038B5E_0FBE.SAFE.zip",
      "Name": "S1A_IW_GRDH_1ADV_20200120T124836_20200120T124908_030884_038B5E_5BF9.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123636_20200120T123744_030884_038B5C_9368.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123636_20200120T123744_030884_038B5C_3CCA.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123736_20200120T123844_030884_038B5C_97E8.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123736_20200120T123844_030884_038B5C_C360.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123836_20200120T123944_030884_038B5C_A37F.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123836_20200120T123944_030884_038B5C_4E90.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123936_20200120T124032_030884_038B5C_006A.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123936_20200120T124032_030884_038B5C_1C68.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123336_20200120T123444_030884_038B5C_5671.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123336_20200120T123444_030884_038B5C_8D6E.SAFE.zip",
      "Name": "S1A_EW_GRDM_1SDH_20200120T123436_20200120T123544_030884_038B5C_F8AB.SAFE.zip",
      "Name": "S1A_EW_GRDM_1ADH_20200120T123436_20200120T123544_030884_038B5C_F994.SAFE.zip",

@w-bc
Copy link

w-bc commented Sep 5, 2023

Tested on Werum testing environment:

IN
curl -XGET "http://localhost:8080/odata/v1/Products?\$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))"

{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "0820f75f-3bdc-4e8d-b725-414d683c2c77",
      "Name": "S1B_IW_RAW__0CDV_20200120T163021_20200120T163241_019903_025A62_9C26.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3321,
      "PublicationDate": "2023-09-05T11:20:59.584Z",
      "EvictionDate": "2023-09-12T11:20:59.584Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "a73bd782b1c0cc7c01b7ce6dcb1379fd",
          "ChecksumDate": "2023-09-05T11:20:59Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T16:30:21Z",
        "End": "2020-01-20T16:32:41Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "32a0e20e-5ef9-4e86-acb4-683757d2fa47",
      "Name": "S1B_IW_RAW__0NDV_20200120T163021_20200120T163241_019903_025A62_7504.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3760,
      "PublicationDate": "2023-09-05T11:21:00.627Z",
      "EvictionDate": "2023-09-12T11:21:00.627Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "1915337877c1c98936df072f617fb123",
          "ChecksumDate": "2023-09-05T11:21:00Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T16:30:21Z",
        "End": "2020-01-20T16:32:41Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "ad7ab60b-6921-4802-bb02-44f96624ab94",
      "Name": "S1B_IW_RAW__0ADV_20200120T163021_20200120T163241_019903_025A62_E7AA.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3761,
      "PublicationDate": "2023-09-05T11:21:01.647Z",
      "EvictionDate": "2023-09-12T11:21:01.647Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "716ee05a89bb9c3e70eb814781ae13e3",
          "ChecksumDate": "2023-09-05T11:21:01Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T16:30:21Z",
        "End": "2020-01-20T16:32:41Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "f234daf8-d3ae-4f48-8719-b8a1f5bec01c",
      "Name": "S1A_IW_RAW__0CDV_20200120T124746_20200120T125111_030884_038B5E_C5AD.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3324,
      "PublicationDate": "2023-09-05T11:21:11.196Z",
      "EvictionDate": "2023-09-12T11:21:11.196Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "13ff18896516ef267d9aa59a8072fec5",
          "ChecksumDate": "2023-09-05T11:21:11Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T12:47:46Z",
        "End": "2020-01-20T12:51:11Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "418a206a-1880-46de-b5f2-3cc1b8ad5e99",
      "Name": "S1A_IW_RAW__0NDV_20200120T124746_20200120T125111_030884_038B5E_1DFE.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3765,
      "PublicationDate": "2023-09-05T11:21:12.348Z",
      "EvictionDate": "2023-09-12T11:21:12.348Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "25683876f429dba861167f8a54f4e4d1",
          "ChecksumDate": "2023-09-05T11:21:12Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T12:47:46Z",
        "End": "2020-01-20T12:51:11Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "8e9ceec1-8852-4096-aa23-e0b4ed8f21e4",
      "Name": "S1A_IW_RAW__0ADV_20200120T124746_20200120T125111_030884_038B5E_AE70.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3764,
      "PublicationDate": "2023-09-05T11:21:13.342Z",
      "EvictionDate": "2023-09-12T11:21:13.342Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "46eb91a1fdf5cdef70ffb199ca22168c",
          "ChecksumDate": "2023-09-05T11:21:13Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T12:47:46Z",
        "End": "2020-01-20T12:51:11Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.312935,
              -11.387472
            ],
            [
              -75.312935,
              -14.93704
            ],
            [
              -14.312935,
              -14.387472
            ],
            [
              -14.312935,
              -11.387472
            ],
            [
              -75.312935,
              -11.387472
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}

@suberti-ads
Copy link

suberti-ads commented Oct 31, 2023

Test on Operational Environment
AND:

API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=startswith(Name,'S1A')%20and%20endswith(Name,'0625D4_E588.SAFE.zip')
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1077  100  1077    0     0   3103      0 --:--:-- --:--:-- --:--:--  3103
{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "416f9f2a-d130-4b67-b572-e372ab312612",
      "Name": "S1A_IW_RAW__0NDV_20231030T070250_20231030T070559_050991_0625D4_E588.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 61223493,
      "PublicationDate": "2023-10-30T16:51:39.092Z",
      "EvictionDate": "2023-11-06T16:51:39.092Z",
      "OriginDate": "2023-10-30T07:08:45.392Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "cece1fc6d1c210f4c04fbfe791e67030",
          "ChecksumDate": "2023-10-30T16:51:39Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2023-10-30T07:02:50.129Z",
        "End": "2023-10-30T07:05:59.267Z"
      },
      "Footprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -12.317,
              59.2936
            ],
            [
              -15.2364,
              47.9241
            ],
            [
              -11.9646,
              47.6385
            ],
            [
              -8.0318,
              58.9592
            ],
            [
              -12.317,
              59.2936
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -12.317,
              59.2936
            ],
            [
              -15.2364,
              47.9241
            ],
            [
              -11.9646,
              47.6385
            ],
            [
              -8.0318,
              58.9592
            ],
            [
              -12.317,
              59.2936
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}

OK

@suberti-ads
Copy link

suberti-ads commented Oct 31, 2023

Test on Operational Environment
OR:

API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=startswith(Name,'S1A_HK_RAW__0____20231025')%20or%20endswith(Name,'06238C_E247.SAFE.zip')
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1737  100  1737    0     0   6723      0 --:--:-- --:--:-- --:--:--  6732
{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "8c17e9ef-132c-4be1-8d98-26ad680e7d4a",
      "Name": "S1A_HK_RAW__0____20231025T161956_20231025T161958_050924________E7C6.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 2981468,
      "PublicationDate": "2023-10-30T14:58:51.484Z",
      "EvictionDate": "2023-11-06T14:58:51.484Z",
      "OriginDate": "2023-10-25T16:31:14.277Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "d1ae04180562bc1103f5ae830cf14c58",
          "ChecksumDate": "2023-10-30T14:58:51Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2023-10-25T16:19:56.639Z",
        "End": "2023-10-25T16:19:58.123Z"
      },
      "Footprint": null,
      "GeoFootprint": null
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "2fed6fc2-0257-4f6a-b9fc-94e8f0c99f43",
      "Name": "S1A_IW_RAW__0CDV_20231025T161107_20231025T161407_050923_06238C_E247.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 106115962,
      "PublicationDate": "2023-10-30T19:28:31.521Z",
      "EvictionDate": "2023-11-06T19:28:31.521Z",
      "OriginDate": "2023-10-25T16:31:14.277Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "33d0af9c5059c3e17b8249149120d12d",
          "ChecksumDate": "2023-10-30T19:28:31Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2023-10-25T16:11:07.518Z",
        "End": "2023-10-25T16:14:07.674Z"
      },
      "Footprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              34.5101,
              -9.3796
            ],
            [
              32.0996,
              1.4638
            ],
            [
              29.9158,
              1.1508
            ],
            [
              32.2951,
              -9.7297
            ],
            [
              34.5101,
              -9.3796
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              34.5101,
              -9.3796
            ],
            [
              32.0996,
              1.4638
            ],
            [
              29.9158,
              1.1508
            ],
            [
              32.2951,
              -9.7297
            ],
            [
              34.5101,
              -9.3796
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}

OK

@suberti-ads
Copy link

suberti-ads commented Oct 31, 2023

Test on Operational Environment
NOT:

API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=startswith(Name,'S1A')%20and%20not%20contains(Name,'IW_RAW')&$top=3
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1970  100  1970    0     0   4212      0 --:--:-- --:--:-- --:--:--  4209
{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "d8ed0550-adad-45d9-8acc-60d17a99d08f",
      "Name": "S1A_OPER_AUX_RESORB_OPOD_20220209T092734_V20220209T052333_20220209T084103.EOF.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 76317,
      "PublicationDate": "2022-02-16T09:44:30.024Z",
      "EvictionDate": "2022-02-23T09:44:30.024Z",
      "OriginDate": null,
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "a8197473dd815968c04db9a68615af18",
          "ChecksumDate": "2022-02-16T09:44:22Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2022-02-09T05:23:33Z",
        "End": "2022-02-09T08:41:03Z"
      },
      "Footprint": null,
      "GeoFootprint": null
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "d6b2ed78-2078-4bb7-bfe4-730ec3222862",
      "Name": "S1A_OPER_AUX_RESORB_OPOD_20220209T111043_V20220209T070217_20220209T101947.EOF.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 76679,
      "PublicationDate": "2022-02-16T09:44:37.365Z",
      "EvictionDate": "2022-02-23T09:44:37.365Z",
      "OriginDate": null,
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "b07136ee02f5f4e1cc8747d63af172a4",
          "ChecksumDate": "2022-02-16T09:44:34Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2022-02-09T07:02:17Z",
        "End": "2022-02-09T10:19:47Z"
      },
      "Footprint": null,
      "GeoFootprint": null
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "8699d62d-fe09-4b6c-92c8-7bf041ae9c99",
      "Name": "S1A_OPER_AUX_PREORB_OPOD_20220209T141614_V20220209T133721_20220209T201221.EOF.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 152335,
      "PublicationDate": "2022-02-16T09:44:50.147Z",
      "EvictionDate": "2022-02-23T09:44:50.147Z",
      "OriginDate": null,
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "4fd3f95c2498d17eddc06ff9b5b2da90",
          "ChecksumDate": "2022-02-16T09:44:46Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2022-02-09T13:37:21Z",
        "End": "2022-02-09T20:12:21Z"
      },
      "Footprint": null,
      "GeoFootprint": null
    }
  ]
}

OK

@suberti-ads
Copy link

suberti-ads commented Oct 31, 2023

Test on Operational Environment
EQ IN:

API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))
PART1: Check that only one product is returned:
{"@odata.context":"$metadata#Products","value":[]}

No return this seems to be NOK
Hereafter attributes for IW product ingested in prip

Use following filter :

FILTER="?\$filter=startswith(Name,'S1A')%20and%20endswith(Name,'0625D4_E588.SAFE.zip')&\$expand=Attributes"

Put result in file :

curl "${FULLQ}" -H "Authorization: Bearer ${TOKEN}" | jq '.value[].Attributes' > Result.json

Check attributes Name equal to productType

suberti@Laptop-COPRS:~/Documents/Git/rs-processing-config/DdipTest$ cat Result.json | jq -c  'map(select(.Name | contains("productType")))' | jq .
[
  {
    "@odata.type": "#OData.CSC.StringAttribute",
    "Name": "productType",
    "ValueType": "String",
    "Value": "IW_RAW__0N"
  }
]

So following my understanding we should have at least this product.

Note: When i tried to use this command without filter on product type i have only old AUX Auxiliary which have ingested in begin of 2022 (before we deactivate distribution of AUX DATA in PRIP)

NOK

@suberti-ads
Copy link

Dear @w-bc @w-fsi or @w-jka ,
Do you have an idea why EQ IN command result was not consistent ?

Stéphane

@w-bc
Copy link

w-bc commented Nov 7, 2023

Hi @suberti-ads, can you try again with "productType" instead of "producttype"? I think this might be the problem.

Wait, I think I saw somewhere "producttype". I will check again, sorry

@w-fsi
Copy link

w-fsi commented Nov 9, 2023

Okay, we couldn't confirm your observation in our environment and everything seems to be working fine with the same software version that is deployed in your environment. Because of this we focused the investigation on differences within Elasticsearch and noticed that the PRIP is still not in line with what had been asked in the documentation: https://github.com/COPRS/production-common/blob/develop/processing-common/doc/indices.md

I am kind of suprised that there are still differences after we had the anomaly recently with the geofootprint that was not setup as asked. It is still not in line however as the analyzer is not setup and now causing the issue you're finding. It was noticed in RS-779 already that the text search like contains, startWith and endsWith are not working as expected without the analyzer as entries are added in lowercase. This does btw also explain @Woljtek observation with the product type needed to be written in lower case when using the UWC.

Please add the analyzer to the PRIP index. Luckily the procedure itself shall be easier than the modification the last time. Have a look at this page: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html#update-settings-analysis

The description of the indices are not a recommendation and are required by the software in order to work correctly. Thus we think that the software is working as expected when the index is fixed.

@suberti-ads
Copy link

suberti-ads commented Nov 13, 2023

Dear @w-fsi ,
Thanks for your answer,
We didn't keep analyzer in configuration due to this issue :
#1065
With this setting ingestion failed during reindex.
i am afraid with this option activated some metadata failed to be extracted.

For test purprose, we activate this option.
Hereafter prip index setting


{
  "prip" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "number_of_shards" : "1",
        "provided_name" : "prip",
        "creation_date" : "1691070249700",
        "analysis" : {
          "analyzer" : {
            "content" : {
              "type" : "keyword"
            }
          }
        },
        "number_of_replicas" : "1",
        "uuid" : "kZcbWx0JTzmQzshVVOroHw",
        "version" : {
          "created" : "7150299"
        }
      }
    }
  }
}

New production has been started after this update to generate new product in prip.
Unfortunately test was still failed.
No data return with test on productType :

Query: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))
API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    50  100    50    0     0    340      0 --:--:-- --:--:-- --:--:--   342
{
  "@odata.context": "$metadata#Products",
  "value": []
}
___________________________________________________________________________________________

I took one of last product IW ingested in prip.
Use following filter :

$filter=startswith(Name,'S1A')%20and%20endswith(Name,'062CDD_976A.SAFE.zip')&$expand=Attributes

Put result in file :

curl "${FULLQ}" -H "Authorization: Bearer ${TOKEN}" | jq '.value[].Attributes' > Result3.json

Check attributes Name equal to productType

suberti@Laptop-COPRS:~/Documents/Git/rs-processing-config/DdipTest$ cat Result3.json | jq -c  'map(select(.Name | contains("productType")))' | jq .
[
  {
    "@odata.type": "#OData.CSC.StringAttribute",
    "Name": "productType",
    "ValueType": "String",
    "Value": "IW_RAW__0S"
  }
]

So we should have at least one product to be returned by "EQ IN" request.

@suberti-ads
Copy link

suberti-ads commented Nov 20, 2023

As discussed i tried to the same request using productType in lower case.

Its working with this :

Query: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('iw_raw__0a','iw_raw__0c','iw_raw__0n'))%20and%20PublicationDate%20gt%202023-11-10T00:00:00.000Z
API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('iw_raw__0a','iw_raw__0c','iw_raw__0n'))%20and%20PublicationDate%20gt%202023-11-10T00:00:00.000Z
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6238  100  6238    0     0  37368      0 --:--:-- --:--:-- --:--:-- 37578
{
  "Name": "S1A_IW_RAW__0NDV_20231113T043941_20231113T044044_051194_062CDD_48AA.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}
{
  "Name": "S1A_IW_RAW__0CDV_20231113T043941_20231113T044044_051194_062CDD_4D3A.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}
{
  "Name": "S1A_IW_RAW__0ADV_20231113T043941_20231113T044044_051194_062CDD_DF39.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}
{
  "Name": "S1A_IW_RAW__0ADV_20231113T050711_20231113T051548_051194_062CE0_A8C8.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}
{
  "Name": "S1A_IW_RAW__0CDV_20231113T050711_20231113T051548_051194_062CE0_445A.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}
{
  "Name": "S1A_IW_RAW__0NDV_20231113T050711_20231113T051548_051194_062CE0_2FC0.SAFE.zip",
  "OriginDate": "2023-11-13T05:18:22.478Z"
}

@w-fsi
Copy link

w-fsi commented Nov 21, 2023

Hi @suberti-ads ,
we just pushed a patch on the develop branch for the PRIP frontend that should fix this issue for the in operator that you observed. The option ensure that the data is sent in lower-case format and that should be compatible with the ES index you're using. By default the option is activated, that it should be sufficient enough to just deploy the new version. Please let us know if this is fixing your observation.

@suberti-ads
Copy link

suberti-ads commented Nov 24, 2023

Dear @w-fsi ,
Thanks !
Function successfully match productType without upercase/minorcase issue

suberti@Laptop-COPRS:~/Documents/Git/rs-processing-config/DdipTest$ sh test-rs-ddip-req-085.sh 
 ### PREREQUISITES ###
Get keycloak token for user <operator1>

Token successfully retrieved

 ### Test the [RS-REQ-SRD-085/1]
RS-API.085.listOneElt 
Query: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))%20and%20PublicationDate%20gt%202023-10-26T00:00:00.000Z
API: https://processing.platform.ops-csc.com/ddip/odata/v1/Products?$filter=Attributes/OData.CSC.StringAttribute/any(att:att/Name%20eq%20'productType'%20and%20att/OData.CSC.StringAttribute/Value%20in%20('IW_RAW__0A','IW_RAW__0C','IW_RAW__0N'))%20and%20PublicationDate%20gt%202023-10-26T00:00:00.000Z
PART1: Check that only one product is returned:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24678  100 24678    0     0  37598      0 --:--:-- --:--:-- --:--:-- 37561
{
  "Name": "S1A_IW_RAW__0CDV_20231030T034808_20231030T035324_050989_0625C3_F20E.SAFE.zip",
  "OriginDate": "2023-10-30T03:53:54.632Z"
}
{
  "Name": "S1A_IW_RAW__0ADV_20231030T034808_20231030T035324_050989_0625C3_8BCA.SAFE.zip",
  "OriginDate": "2023-10-30T03:53:54.632Z"
}
[...]

So all tests are OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Phase2 WERUM dev Ticket dedicated to WERUM development
Projects
None yet
Development

No branches or pull requests

4 participants