Nested query search
Type of change
-
Feature
Does this introduce a change in the core logic?
- [YES]
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
AWS -
Azure -
GCP -
IBM -
Common code
Does this introduce a breaking change?
- [NO]
How to test:
Functionality can be tested with several requests:
With pure nested queries and their combination:
{
"kind": "osdu:wks:work-product-component--WellboreMarkerSet:1.0.0",
"query":"nested(data.Markers, (MarkerMeasuredDepth:(<15) AND MarkerName:\"North Sea Supergroup\"))"
}
{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query":"nested(data.VerticalMeasurements, (VerticalMeasurement:(>15) AND VerticalReferenceID:\"Example*\")) AND nested(data.FacilityOperators, (FacilityOperatorID:\"Example*\"))",
"limit":100
}
And with combination of string queries and nested queries:
{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query":"data.Source:\"Example*\" AND nested(data.VerticalMeasurements, (VerticalMeasurement:(>15) AND VerticalReferenceID:\"Example*\"))",
"limit":100
}
{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query":"data.Source:\"Example*\" AND nested(data.VerticalMeasurements, (VerticalMeasurement:(>15) AND VerticalReferenceID:\"Example*\")) AND data.FacilityName:\"Example*\"",
"limit":100
}
Sort and aggregation also can be tested:
{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query": "data.Source:\"Example*\" AND nested(data.VerticalMeasurements, (VerticalMeasurement:(>15) AND VerticalReferenceID:\"Example*\"))",
"limit": 100,
"sort": {
"field": [
"nested(data.FacilityOperators, TerminationDateTime, min)"
],
"order": [
"ASC"
]
},
"aggregateBy": "nested(data.VerticalMeasurements, VerticalMeasurement)"
}
Dev Checklist:
-
Added Unit Tests, wherever applicable. -
Updated the Readme, if applicable. -
Existing Tests pass -
Verified functionality locally -
Self Reviewed my code for formatting and complex business logic.
Edited by Rustam Lotsmanenko (EPAM)