Skip to content

Commit dd102de

Browse files
authored
MB-65501: Added validation for geo bounding box queries (#2158)
1 parent 72de0d7 commit dd102de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

search/query/geo_boundingbox.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ func (q *GeoBoundingBoxQuery) Searcher(ctx context.Context, i index.IndexReader,
8585
}
8686

8787
func (q *GeoBoundingBoxQuery) Validate() error {
88+
if q.TopLeft[1] < q.BottomRight[1] {
89+
return fmt.Errorf("geo bounding box top left should be higher than bottom right")
90+
}
8891
return nil
8992
}
9093

0 commit comments

Comments
 (0)