What is the best way to figure out "unit of measure" of any specific field from Search response?
Please see this test case from an earlier release. https://community.opengroup.org/osdu/platform/pre-shipping/-/blob/main/R3-M16/Test_Plan_Results_M16/Manifest_Ingestion/M16-AWS-Manifest-Ingestion-Unit-convert-Debasis.txt
Here field CableLength value was 6000 ft. in Ingestion payload (JSON file). We added this field in meta block and wanted conversion from ft to meter. Hence Search response shows correctly converted value - 1828.8 meters. (as expected).
This becomes clear when we see initial JSON payload by using Storage service and later when we retrieve the record by using Search service.
But the question is - if someone looks at Search service alone, what is the clue?
- To know that a field has undergone conversion?
- And to know what it has been converted to and what is the matching unit of measure for its current value?
Checking Schema service, I can find out this field is using "length" unit of measure. schema-SAS.txt
"CableLength": {
"description": "Total length of receiver array",
"x-osdu-frame-of-reference": "UOM:length",
"type": "number"
},
From Reference data UnitofMeasure, I can also find out Base unit of measure for "length" is "metre". IsBaseUnit=true. UnitDimensioName="length"
From Search, I may include the field "index" to get more information. That trick is handy when something goes wrong with indexing. But otherwise it shows status=200.
How do we find out if the user opted to leave values in original unit (foot) and did not bother to convert to SI unit (meter)?
Copying to Mark Chance ( @Java1Guy ) as he is currently working on Search service enhancements