Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Completed
Categories Atlas Search
Created by Guest
Created on Nov 10, 2020

The equals operator should support numeric datatypes

Currently, for querying on "number" datatypes, we can only use "range" or "near" operators. The "equals" operator supports querying only "boolean" and "objectId" values, and not numeric values. If we want to do equality based matching for number datatypes, then we can leverage "range" using "gt" and "lt" to find it. However this might be sub-optimal in some cases (such as when performing equality match on decimals). Therefore, this is a feature request for having equals operator support numeric datatypes (in addition to boolean and objectId).
  • ADMIN RESPONSE
    Oct 18, 2025
    Documentation can be found here ( https://www.mongodb.com/docs/atlas/atlas-search/equals/ )
  • Guest
    Feb 6, 2023
    Hi Admin, Really good news! It seems that the documentation for this change is not updated yet. Is this currently available in beta only? Thanks, Prasad
  • Guest
    Jan 12, 2023
    Hello, Will this feature support comparisons with numbers in arrays? Few examples below: 1. Does the array field [234, 635, 287] contain 635? 2. Does the array field [234, 635, 287] exactly match [234, 635, 287]? 3. Does the array field [234, 635, 287] match one or more of [234, 635]? Thanks!
  • Guest
    Jan 9, 2023
    Hello, Is there an ETA on this feature? Thanks, Prasad
  • Guest
    Jul 29, 2022
    This feature request would also apply for the "date" datatype, which is currently supported only by the "range" or "near" operators, but not by the "equals" operator.
  • Guest
    May 20, 2022
    Yes, we also need this feature. It’s not recommanded to use a $match in a $search query because it can drastically slow down query results (according to the docs).