We are using Spring Data Neo4j 3.2.0 ,and Neo4j-spatial 0.13-neo4j-2.1.6 in a Grails Project 2.4.3
In UserDomain
@Indexed(indexType = IndexType.POINT, indexName = "junctionLocations")
Point wkt
In UserRepository
@Transactional
Result<UserDomain> findWithinDistance( final String indexName, Circle circle)
@Query("START item=node:junctionLocations({0}) RETURN labels(item) as label ,item")
List match(String a)
So when we run
Iterable<UserDomain> teamMembers1 = userDomainRepository.findWithinDistance
("junctionLocations", new
Circle(new Point(28.6100,77.2300),new Distance(2, Metrics.KILOMETERS)));
Then it give exact data but when we run
Iterable<UserDomain> teamMembers = userDomainRepository.match("withinDistance:[28.6100,77.2300,2.0]")
then it does not give any data but if we increase the distance to 10000 then it give data .
Actually we want to get correct data using Cypher Query. Are we missing something ? Is there anyway to get correct data using Cypher ?