Try asking a view of spatial views in Spring
using the repository of CouchBase
... where I put this:
@Dimensional(designDocument = "paradas", spatialViewName = "paradas", dimensions = 2)
List<Parada> findByCoordenadaWithin(Circle x);
The problem is that if the parameter is a Box
, it works, but with circle
it returns an empty list ...
I'm pretty sure the problem is in Spring
when calculating false positives ... I know this because in aplication.Properties
I included debugging ...
#Para logs de los querys
logging.level.org.springframework.data.couchbase.repository.query=debug
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR
and the result of the query is ...
2018-08-16 15:44:38.114 DEBUG 6480 --- [nio-8084-exec-2] o.s.d.c.r.query.SpatialViewBasedQuery : Executing spatial view query: stale=false&start_range=[-9.2274133,-87.91111661]&end_range=[4.7725867,-73.91111661]
If I execute this in couchbase with the spatial view it works and I return the documents ... But somehow Spring
does not process the results ... In the second line the arrangement is observed.
2018-08-16 15:49:05.068 DEBUG 3828 --- [nio-8084-exec-1] o.s.d.c.r.query.SpatialViewBasedQuery : Executing spatial view query: stale=false&start_range=[-9.2274133,-87.91111661]&end_range=[4.7725867,-73.91111661]
2018-08-16 15:49:05.197 DEBUG 3828 --- [nio-8084-exec-1] m.m.a.RequestResponseBodyMethodProcessor : Written [[]] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@1debc91c]
2018-08-16 15:49:05.197 DEBUG 3828 --- [nio-8084-exec-1] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-08-16 15:49:05.197 DEBUG 3828 --- [nio-8084-exec-1] o.s.web.servlet.DispatcherServlet : Successfully completed request
I MUST RECHARGE THAT I AM USING SPRING BOOT 1.5.10.RELEASE AND COUCHBASE 5.0