Equals class

The equals operator checks whether a field matches a value you specify. equals supports querying the following data types:

  • boolean
  • objectId
  • number, including int32, int64, and double
  • date

You can use the equals operator to query booleans, objectIds, numbers, and dates in arrays. If at least one element in the array matches the "value" field in the equals operator, Atlas Search adds the document to the result set.

Example

Expected result:

"equals": {
    "path": "name",
    "value": "jim hall"
  }

Expected result:

"equals": {
  "path": "verified_user",
  "value": true
}

https://www.mongodb.com/docs/atlas/atlas-search/equals/

Inheritance

Constructors

Equals.new({required String path, required dynamic value, ScoreModify? score})
path - Indexed field to search.

Properties

content ExpressionContent
no setterinherited
entry MapEntry<String, ExpressionContent>
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
key String
no setterinherited
operator String
no setterinherited
rawContent → dynamic
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() MongoDocument
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited