Hi elastic experts,
I am experiencing some troubles making the following geo query to work:
GET grille_arome_001/gridpt/_search
{
"query": {
"bool": {
"filter":
{
"geo_shape": {
"location": {
"relation": "within",
"indexed_shape": {
"index": "geographie",
"type": "parc_eolien",
"id": 1,
"path": "location"
}
}
}
}
}
}
}
It always returns 0 match with the following input data:
grid index
PUT grille_arome_001_test
{
"mappings": {
"gridpt": {
"properties": {
"location": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1100.0m"
}
}
}
}
}
grid point sample data
PUT grille_arome_001_test/gridpt/1
{
"location": {
"type": "envelope",
"coordinates": [
[
50.05,
1.86
],
[
50.06,
1.87
]
]
}
}
geographie index
PUT geographie
{
"mappings": {
"parc_eolien": {
"properties": {
"idr": {
"type": "keyword"
},
"location": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1.0m"
}
}
}
}
}
geographie sample data
PUT geographie/parc_eolien/1
{
"idr": "E.SOM",
"location": {
"type": "point",
"coordinates": [
1.87173,
50.0542
]
}
}
Any help on this problem would be really appreciated.