I'm new to cloudant, i want to fetch records by lat and long with particular category.
//This is getting records by Lat and Long
dbname/_design/ad/_geo/geoidx?lat=29.2609417&lon=71.1750101&radius=100
but i want to fetch records by particular category something like this...
dbname/_design/ad/_geo/geoidx?lat=22.2609417&lon=73.1750101&radius=100&item_type_id: '12345'
how can i achieve this? please reply... Thanks..
You can't achieve this using the Cloudant Geo index. You need to use Cloudant Search (powered by Lucene Geo), which allows you to combine a radius search with attribute search. Here's a tutorial: https://developer.ibm.com/clouddataservices/2016/01/07/geospatial-query-with-cloudant-search/
The only caveat is with Cloudant Search you can only do bounding box and radius searches -- no polygon searches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With