How do I use the 2dsphere index when mongodb queries a collection of rectangular area coordinates?

1. See the introduction of the official website in which the rectangle $box method only supports 2d indexes.
Only the 2d geospatial index supports $box.
the official 2dsphere index is also recommended. The method I know now, geoWithinBox, uses a 2d index instead of the {loc:2dsphere} index I created in the document.

    Filters.geoWithinBox("loc", double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY)

Please tell me how to use the 2dsphere index I created when querying rectangles.

Mar.18,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf8945-32125.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf8945-32125.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?