Skip to content

Commit 440d465

Browse files
authored
Update $not operator documentation
1 parent eca57ca commit 440d465

File tree

1 file changed

+8
-5
lines changed
  • articles/cosmos-db/mongodb/vcore/operators/logical-query

1 file changed

+8
-5
lines changed

articles/cosmos-db/mongodb/vcore/operators/logical-query/$not.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The `$not` operator performs a logical NOT operation on a specified expression a
3434

3535
## Examples
3636

37-
Let's understand the usage with sample json from `stores` dataset.
37+
Consider this sample document from the stores collection.
3838

3939
```json
4040
{
@@ -148,7 +148,7 @@ Let's understand the usage with sample json from `stores` dataset.
148148

149149
### Example 1: Use NOT operation as logical-query operator
150150

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.
152152

153153
```javascript
154154
db.stores.find({
@@ -163,7 +163,7 @@ The example helps to find stores where the number of full-time staff isn't equal
163163
}).limit(2)
164164
```
165165

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:
167167

168168
```json
169169
[
@@ -192,7 +192,7 @@ The query returns up to two stores where full-time staff count differs from 5.
192192

193193
### Example 2: Use NOT operator as boolean-expression to identify stores that aren't high-volume
194194

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).
196196

197197
```javascript
198198
db.stores.aggregate([
@@ -216,9 +216,10 @@ db.stores.aggregate([
216216
])
217217
```
218218

219-
The query identifies stores that aren't high-volume.
219+
The first two results returned by this query are:
220220

221221
```json
222+
[
222223
{
223224
"_id": "905d1939-e03a-413e-a9c4-221f74055aac",
224225
"name": "Trey Research | Home Office Depot - Lake Freeda",
@@ -233,8 +234,10 @@ The query identifies stores that aren't high-volume.
233234
"isNotHighVolume": false,
234235
"storeCategory": "Small/Medium Store"
235236
}
237+
]
236238
```
237239

238240
## Related content
239241

240242
[!INCLUDE[Related content](../includes/related-content.md)]
243+

0 commit comments

Comments
 (0)