I have 2 level nested JSON as below, when i run below query i get zero records even though i have more than 10 records matching the tags. Is my query correct?
What if instead of using an UNNEST, you made use of the ANY/SATISFIES condition in your WHERE clause. For example, your query would look something like this:
SELECT
*
FROM `bucket-name-here`
WHERE
ANY tag IN search.tags SATISFIES tag IN ['powerpoint', 'ppt'] END;
While this is possible (for longitude and latitude), it does involve a lot of complex math to accomplish the job. A Google search lists a variety of formulas to accomplish the job, most of which should work fine with Couchbase.
You’ll be using various number functions like ACOS, etc.
@badrictl You can’t directly do radius search with Spatial Views. You would need to do that in your application. You would calculate a bounding box around the radius you want to search for, and then filter out the false positives.