Skip to content

Commit 40baba7

Browse files
committed
updates to the blocking issue
1 parent 919dfe9 commit 40baba7

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

articles/cosmos-db/mongodb/vcore/background-indexing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Background Indexing
3-
titleSuffix: Background Indexing on Azure Cosmos DB for MongoDB vCore
2+
title: Background indexing
3+
titleSuffix: Background indexing on Azure Cosmos DB for MongoDB vCore
44
description: Background indexing to enable non-blocking operation during index creation
55
author: avijitgupta
66
ms.author: avijitgupta

articles/cosmos-db/mongodb/vcore/indexing.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ This same compound index doesn't work in this case since there's an array in the
113113
}
114114
```
115115

116-
**Limitations**
116+
### Limitations
117117

118118
- Maximum of 32 fields\paths within a compound index.
119119

@@ -130,7 +130,7 @@ db.products.createIndex (
130130
)
131131
```
132132

133-
**Limitations**
133+
### Limitations
134134

135135
- Partial indexes don't support `ORDER BY` or `UNIQUE` unless the filter qualifies.
136136

@@ -173,26 +173,26 @@ Once the text index is created, you can perform text searches using the "text" o
173173

174174
- Perform a text search for the phrase `Cosmos DB`.
175175

176-
```javascript
177-
use cosmicworks
176+
```javascript
177+
use cosmicworks
178178

179-
db.products.find(
180-
{ $text: { $search: "Cosmos DB" } }
181-
)
182-
```
179+
db.products.find(
180+
{ $text: { $search: "Cosmos DB" } }
181+
)
182+
```
183183

184184
- Optionally, use the `$meta` projection operator along with the `textScore` field in a query to see the weight
185185

186-
```javascript
187-
use cosmicworks
186+
```javascript
187+
use cosmicworks
188188
189-
db.products.find(
190-
{ $text: { $search: "Cosmos DB" } },
191-
{ score: { $meta: "textScore" } }
192-
)
193-
```
189+
db.products.find(
190+
{ $text: { $search: "Cosmos DB" } },
191+
{ score: { $meta: "textScore" } }
192+
)
193+
```
194194

195-
**Limitations**
195+
### Limitations
196196

197197
- Only one text index can be defined on a collection.
198198
- Text indexes support simple text searches and don't yet provide advanced search capabilities like regular expressions.
@@ -216,7 +216,7 @@ Index on single field, indexes all paths beneath the `field` , excluding other f
216216
217217
Creating an index on { "pets.$**": 1 }, creates index on details & sub-document properties but doesn't create an index on “familyName”.
218218

219-
**Limitations**
219+
### Limitations
220220

221221
- Wildcard indexes can't support unique indexes.
222222
- Wildcard indexes don't support push downs of `ORDER BY` unless the filter includes only paths present in the wildcard (since they don't index undefined elements)
@@ -242,7 +242,7 @@ Use the `createIndex` method with the `2d` option to create a geospatial index o
242242
db.places.createIndex({ "location": "2d"});
243243
```
244244
245-
**Limitations**
245+
### Limitations
246246
247247
- Only 1 location field can be part of the `2d` index and only 1 other non-geospatial field can be part of the `compound 2d` index
248248
`db.places.createIndex({ "location": "2d", "non-geospatial-field": 1 / -1 })`
@@ -260,22 +260,22 @@ db.places.createIndex({ "location": "2dsphere"});
260260
`2dsphere` indexes allow creating indexes on multiple geospatial and multiple non-geospatial data fields.
261261
`db.places.createIndex({ "location": "2d", "non-geospatial-field": 1 / -1, ... "more non-geospatial-field": 1 / -1 })`
262262
263-
**Limitations**
263+
### Limitations
264264
265265
- A compound index using a regular index and geospatial index isn't supported. Creating either of the geospatial indexes would lead into errors.
266266

267-
```javascript
268-
// Compound Regular & 2dsphere indexes are not supported yet
269-
db.collection.createIndex({a: 1, b: "2dsphere"})
267+
```javascript
268+
// Compound Regular & 2dsphere indexes are not supported yet
269+
db.collection.createIndex({a: 1, b: "2dsphere"})
270270
271-
// Compound 2d indexes are not supported yet
272-
db.collection.createIndex({a: "2d", b: 1})
273-
```
271+
// Compound 2d indexes are not supported yet
272+
db.collection.createIndex({a: "2d", b: 1})
273+
```
274274

275275
- Polygons with holes don't work. Inserting a Polygon with hole isn't restricted though `$geoWithin` query fails for scenarios:
276276
1. If the query itself has polygon with holes.
277277

278-
```javascript
278+
```javascript
279279
coll.find(
280280
{
281281
"b": {
@@ -296,12 +296,12 @@ db.collection.createIndex({a: "2d", b: 1})
296296
})
297297
298298
// MongoServerError: $geoWithin currently doesn't support polygons with holes
299-
```
299+
```
300300

301-
1. If there's any unfiltered document that has polygon with holes.
301+
2. If there's any unfiltered document that has polygon with holes.
302302
303-
```javascript
304-
[mongos] test> coll.find()
303+
```javascript
304+
[mongos] test> coll.find()
305305
[
306306
{
307307
_id: ObjectId("667bf7560b4f1a5a5d71effa"),
@@ -315,16 +315,16 @@ db.collection.createIndex({a: "2d", b: 1})
315315
}
316316
]
317317
318-
// MongoServerError: $geoWithin currently doesn't support polygons with holes
319-
```
318+
// MongoServerError: $geoWithin currently doesn't support polygons with holes
319+
```
320320
321-
1. `key` field is mandatory while using `geoNear`.
321+
3. `key` field is mandatory while using `geoNear`.
322322
323-
```javascript
324-
[mongos] test> coll.aggregate([{ $geoNear: { near: { "type": "Point", coordinates: [0, 0] } } }])
323+
```javascript
324+
[mongos] test> coll.aggregate([{ $geoNear: { $near: { "type": "Point", coordinates: [0, 0] } } }])
325325

326-
// MongoServerError: $geoNear requires a 'key' option as a String
327-
```
326+
// MongoServerError: $geoNear requires a 'key' option as a String
327+
```
328328
329329
## Next steps
330330

0 commit comments

Comments
 (0)