undefined < Number === true?
expiresAt field in my schema that holds an expiration date for a record. If its undefined, it should never expire. I have an index on this field as I have a cron job running every minute to see what should be expired. That query looks like so:However, this returns records that have an undefined value for the
expiresAt field, requiring me to filter these in memory with:Being this runs so frequently, its eating through my db bandwidth, retrieving these unwanted rows.
Before I get cute with my schema to hack around this...
1) Is this the intended behavior of the query engine? It doesnt match javascript's behavior.
2) Is there a way to better structure or query my existing index to remove these results?
