I have a really strange problem where two seemingly identical strings are returning different matches in MongoDB.
I have copied and pasted the two (apparently different) strings below with the quotation marks either side (direct from Robo3T) to highlight any whitespace that may be present - of which there is none visible.
"KUWAIT: Premier League"
"KUWAIT: Premier League"
Searching with one of these strings returns one set of documents and searching with the other string returns another set of documents. Both those sets of documents should be returned as one.
This is starting to cause me a headache as I have the string stored in another collection that I lookup dynamically, and half the time it's not matching.
Is there anyway I can validate what the issue is here? I've looked at BSON types and can see only one String $type
, which Robo3T confirms.
The problem exists using Mongoose & querying with Robo3T.
Thanks.