You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/mongodb/vcore/operators/logical-query/$not.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The `$not` operator performs a logical NOT operation on a specified expression a
34
34
35
35
## Examples
36
36
37
-
Let's understand the usage with sample json from `stores` dataset.
37
+
Consider this sample document from the stores collection.
38
38
39
39
```json
40
40
{
@@ -148,7 +148,7 @@ Let's understand the usage with sample json from `stores` dataset.
148
148
149
149
### Example 1: Use NOT operation as logical-query operator
150
150
151
-
The example helps to find stores where the number of full-time staff isn't equal to 5 using the `$not` operator with $eq. It returns only the `name` and `staff` fields for up to two such matching documents.
151
+
This query retrieves stores where the number of full-time staff isn't equal to 5 using the `$not` operator with $eq. It returns only the `name` and `staff` fields for up to two such matching documents.
152
152
153
153
```javascript
154
154
db.stores.find({
@@ -163,7 +163,7 @@ The example helps to find stores where the number of full-time staff isn't equal
163
163
}).limit(2)
164
164
```
165
165
166
-
The query returns up to two stores where full-time staff count differs from 5.
166
+
The first two results returned by this query are:
167
167
168
168
```json
169
169
[
@@ -192,7 +192,7 @@ The query returns up to two stores where full-time staff count differs from 5.
192
192
193
193
### Example 2: Use NOT operator as boolean-expression to identify stores that aren't high-volume
194
194
195
-
The example finds stores that don't have high sales volume (not greater than 50,000).
195
+
This query retrieves stores that don't have high sales volume (not greater than 50,000).
196
196
197
197
```javascript
198
198
db.stores.aggregate([
@@ -216,9 +216,10 @@ db.stores.aggregate([
216
216
])
217
217
```
218
218
219
-
The query identifies stores that aren't high-volume.
219
+
The first two results returned by this query are:
220
220
221
221
```json
222
+
[
222
223
{
223
224
"_id": "905d1939-e03a-413e-a9c4-221f74055aac",
224
225
"name": "Trey Research | Home Office Depot - Lake Freeda",
@@ -233,8 +234,10 @@ The query identifies stores that aren't high-volume.
0 commit comments