Hi,
Is there a way to list documents that are large/smaller than x bytes?
Thanks,
Moon
Hi,
Is there a way to list documents that are large/smaller than x bytes?
Thanks,
Moon
Hey @moon0326,
I know this isn’t exactly bytes like you were initially looking for, but would something like this work?:
You can create a view that does JSON.stringify
on every document, get the length, and then do some logic to emit results based on the string length. Of course each character in a string could have a different byte size depending on the character encoding, but maybe this will accomplish enough of what you need?
Let me know if this helps at all.
Best,
@nraboy Thank you! Yes, I think that trick should work
Awesome!
Reach out if you need anything else