Last time I was stumped by the MongoDB $gt:
operator. I wanted to look for restaurants in a certain
Manhattan burough OR in a zipcode greater than a certain
zipcode. Well, I was getting different results between
Mongo and MySQL.
To > or Not To >, That Is the Query
Lets say we have three records with the same key but the values
are 1, 2, and "3". Yup, you got it two numerics and one
string. I would expect schema less data to be free flowing,
not typed, and pretty much a free for all. Whoops. Bad
assumption on my part for Mongo use.
I added three JSON documents into Mongo as can be seen
below:
Our three documents with the values of 1, 2, & … |