Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 53bcbd4

Browse files
nonogarrensmith
authored andcommitted
Add a warning for $lt and $gt with strings (#448)
Comparison of strings with mango selectors `$gt` and `$lt` and be surprising. Let's add a warning about that.
1 parent 41d1be5 commit 53bcbd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/database/find.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,9 @@ the database performs a full scan of the primary index:
756756
in production.
757757

758758
Most selector expressions work exactly as you would expect for the given
759-
operator.
759+
operator. But it is not always the case: for example, comparison of strings is
760+
done with ICU and can can give surprising results if you were expecting ASCII
761+
ordering. See :ref:`views/collation` for more details.
760762

761763
.. _find/sort:
762764

0 commit comments

Comments
 (0)