i've got a problem with a BoudingBox Query.
When i do a search and send the query via get parameter everything works
fine.
If i do it via a request body i don't get a hit.
Can you give me a hint what im doing wrong?
If i do a Boundingbox query with a get body i get no result.
If i do the same query with a get param i will get the expected result.
#do a search request with request Body
curl -XGET 'http://localhost:9200/testpois5/driver/_search?pretty=true' -d '{"query":{"match_all":{}},"filter":{"geo_bbox":{"location":{"top_left":[9.935735,53.552467],"bottom_right":[10.0,52.551963]}}}}'
Result
> {
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
#}
No Match found? This should match, where is the Problem?
had a quick peek on your sample, my assumption is the following:
The query itself does not return any hits, because the longitude of the
POI is outside the bounding box
The reason why your second query does return something is, that actually
a match_all query is executed, because you didnt specify a query. If you
wanted to specify it, you would have to put the encoded body into the
source parameter.
i've got a problem with a BoudingBox Query.
When i do a search and send the query via get parameter everything works
fine.
If i do it via a request body i don't get a hit.
Can you give me a hint what im doing wrong?
If i do a Boundingbox query with a get body i get no result.
If i do the same query with a get param i will get the expected result.
#do a search request with request Body
curl -XGET 'http://localhost:9200/testpois5/driver/_search?pretty=true' -d '{"query":{"match_all":{}},"filter":{"geo_bbox":{"location":{"top_left":[9.935735,53.552467],"bottom_right":[10.0,52.551963]}}}}'
Result
> {
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :
}
#}
No Match found? This should match, where is the Problem?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.