Skip to content

Commit 1084c60

Browse files
author
Alex Roitman
committed
Apply limit on top of cursor
1 parent 4eca0cd commit 1084c60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/search.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ type iterItem struct {
352352
}
353353

354354
func nearestNeighbors(sw *scanWriter, lat, lon float64, iter func(id string, o geojson.Object, fields []float64, dist *float64) bool) {
355-
limit := int(sw.limit)
355+
limit := int(sw.cursor + sw.limit)
356356
var items []iterItem
357357
sw.col.NearestNeighbors(lat, lon, func(id string, o geojson.Object, fields []float64) bool {
358358
if _, ok := sw.fieldMatch(fields, o); ok {

0 commit comments

Comments
 (0)