i want to use order function with SpatialQuery but give the error.
let query = spatialQuery.from(‘locations’, ‘GetNearBy’)
.order(couchbase.ViewQuery.Order.DESCENDING) // give error in this line.
.stale(spatialQuery.Update.BEFORE)
.bbox(bbox)
.skip(filter.PageIndex)
.limit(filter.PageSize);
can you help me?
In order to generate an ordered list in this case, we would need to have some sort of relativity between entries within the result set. In the case of a spatial query, there is no relativity to sort by. Can you provide a bit more detail on the sorting behaviour you are looking for? You will likely need to perform your ordering on the client side.