-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Terradue/SUPERVISOR-72
Complex Search Support for ISupplier
- Loading branch information
Showing
30 changed files
with
1,348 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"filter": { | ||
"op": "=", | ||
"args": [ | ||
{ | ||
"property": "id" | ||
}, | ||
"LC08_L1TP_060247_20180905_20180912_01_T1_L1TP" | ||
] | ||
}, | ||
"result": | ||
{ | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}uid": "LC08_L1TP_060247_20180905_20180912_01_T1_L1TP" | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"filter": { | ||
"op": "and", | ||
"args": [ | ||
{ | ||
"op": "=", | ||
"args": [ | ||
{ | ||
"property": "id" | ||
}, | ||
"S2A_60HWB_20201111_0_L2A" | ||
] | ||
}, | ||
{ | ||
"op": "=", | ||
"args": [ | ||
{ | ||
"property": "collection" | ||
}, | ||
"sentinel-s2-l2a-cogs" | ||
] | ||
} | ||
] | ||
}, | ||
"result": | ||
{ | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}uid": "S2A_60HWB_20201111_0_L2A", | ||
"{http://a9.com/-/opensearch/extensions/eo/1.0/}parentIdentifier": "sentinel-s2-l2a-cogs" | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example10.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "between", | ||
"args": [ | ||
{ | ||
"property": "eo:cloud_cover" | ||
}, | ||
0, | ||
50 | ||
] | ||
}, | ||
"result": { | ||
"{http://a9.com/-/opensearch/extensions/eo/1.0/}cloudCover": "[0,50]" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example11.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "like", | ||
"args": [ | ||
{ "property": "mission" }, | ||
"sentinel%" | ||
] | ||
}, | ||
"exception": "System.NotSupportedException" | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example12.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "in", | ||
"args": [ | ||
{ | ||
"property": "keywords" | ||
}, | ||
[ | ||
"fire", | ||
"forest", | ||
"wildfire" | ||
] | ||
] | ||
}, | ||
"result": { | ||
"{http://purl.org/dc/terms/}subject": "{fire,forest,wildfire}" | ||
} | ||
} |
103 changes: 103 additions & 0 deletions
103
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "and", | ||
"args": [ | ||
{ | ||
"op": "=", | ||
"args": [ | ||
{ | ||
"property": "collection" | ||
}, | ||
"landsat8_l1tp" | ||
] | ||
}, | ||
{ | ||
"op": "<=", | ||
"args": [ | ||
{ | ||
"property": "eo:cloud_cover" | ||
}, | ||
10 | ||
] | ||
}, | ||
{ | ||
"op": ">=", | ||
"args": [ | ||
{ | ||
"property": "datetime" | ||
}, | ||
{ | ||
"timestamp": "2021-04-08T04:39:23Z" | ||
} | ||
] | ||
}, | ||
{ | ||
"op": "s_intersects", | ||
"args": [ | ||
{ | ||
"property": "geometry" | ||
}, | ||
{ | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
43.5845, | ||
-79.5442 | ||
], | ||
[ | ||
43.6079, | ||
-79.4893 | ||
], | ||
[ | ||
43.5677, | ||
-79.4632 | ||
], | ||
[ | ||
43.6129, | ||
-79.3925 | ||
], | ||
[ | ||
43.6223, | ||
-79.3238 | ||
], | ||
[ | ||
43.6576, | ||
-79.3163 | ||
], | ||
[ | ||
43.7945, | ||
-79.1178 | ||
], | ||
[ | ||
43.8144, | ||
-79.1542 | ||
], | ||
[ | ||
43.8555, | ||
-79.1714 | ||
], | ||
[ | ||
43.7509, | ||
-79.6390 | ||
], | ||
[ | ||
43.5845, | ||
-79.5442 | ||
] | ||
] | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"result": { | ||
"{http://a9.com/-/opensearch/extensions/eo/1.0/}parentIdentifier": "landsat8_l1tp", | ||
"{http://a9.com/-/opensearch/extensions/eo/1.0/}cloudCover": "10]", | ||
"{http://a9.com/-/opensearch/extensions/time/1.0/}start": "2021-04-08T04:39:23Z", | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}relation": "intersects", | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}geometry": "POLYGON((43.5845 -79.5442,43.6079 -79.4893,43.5677 -79.4632,43.6129 -79.3925,43.6223 -79.3238,43.6576 -79.3163,43.7945 -79.1178,43.8144 -79.1542,43.8555 -79.1714,43.7509 -79.639,43.5845 -79.5442))" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "and", | ||
"args": [ | ||
{ | ||
"op": ">", | ||
"args": [ { "property": "sentinel:data_coverage" }, 50 ] | ||
}, | ||
{ | ||
"op": "<", | ||
"args": [ { "property": "eo:cloud_cover" }, 10 ] | ||
} | ||
] | ||
}, | ||
"exception": "System.NotSupportedException" | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "or", | ||
"args": [ | ||
{ | ||
"op": ">", | ||
"args": [ { "property": "sentinel:data_coverage" }, 50 ] | ||
}, | ||
{ | ||
"op": "<", | ||
"args": [ { "property": "eo:cloud_cover" }, 10 ] | ||
} | ||
] | ||
}, | ||
"exception": "System.NotSupportedException" | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "=", | ||
"args": [ | ||
{ "property": "prop1" }, | ||
{ "property": "prop2" } | ||
] | ||
}, | ||
"exception": "System.NotSupportedException" | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "t_intersects", | ||
"args": [ | ||
{ | ||
"property": "datetime" | ||
}, | ||
{ | ||
"interval": [ | ||
"2020-11-11T00:00:00Z", | ||
"2020-11-12T00:00:00Z" | ||
] | ||
} | ||
] | ||
}, | ||
"result": { | ||
"{http://a9.com/-/opensearch/extensions/time/1.0/}relation": "intersects", | ||
"{http://a9.com/-/opensearch/extensions/time/1.0/}start": "2020-11-11T00:00:00Z", | ||
"{http://a9.com/-/opensearch/extensions/time/1.0/}end": "2020-11-12T00:00:00Z" | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/Stars.Data.Tests/Resources/Suppliers/Opensearchable/CQL2Tests_Example7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"filter-lang": "cql2-json", | ||
"filter": { | ||
"op": "s_intersects", | ||
"args": [ | ||
{ | ||
"property": "geometry" | ||
}, | ||
{ | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-77.0824, | ||
38.7886 | ||
], | ||
[ | ||
-77.0189, | ||
38.7886 | ||
], | ||
[ | ||
-77.0189, | ||
38.8351 | ||
], | ||
[ | ||
-77.0824, | ||
38.8351 | ||
], | ||
[ | ||
-77.0824, | ||
38.7886 | ||
] | ||
] | ||
] | ||
} | ||
] | ||
}, | ||
"result": { | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}relation": "intersects", | ||
"{http://a9.com/-/opensearch/extensions/geo/1.0/}geometry": "POLYGON((-77.0824 38.7886,-77.0189 38.7886,-77.0189 38.8351,-77.0824 38.8351,-77.0824 38.7886))" | ||
} | ||
} |
Oops, something went wrong.