Does anyone have an example of how you query documents with the near operator? I'm not really clear if you're supposed to use a string or array or something else.
Good morning @wmcmorrow2 !
I'm looking for an example, but in the meantime, check out the near tests
https://github.com/payloadcms/payload/blob/master/test/collections-rest/int.spec.ts#L800
For instance, one test uses..
query: {
// querying large enough range to include all docs
point: { near: '0, 0, 100000, 0' },
},
So it looks like it can be a point / range in CSV format?
@notchr Ahh yes, it's a string! The error was due to using longitude twice. Many thanks
Of course!
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.