Skip to content

Commit cba7122

Browse files
authored
Merge pull request #99559 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to master to sync with https://github.com/Microsoft/azure-docs (branch master)
2 parents 6c671ea + 34a7a74 commit cba7122

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

articles/cosmos-db/how-to-use-stored-procedures-triggers-udfs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The following example shows how to register a stored procedure by using the Java
139139
```javascript
140140
const container = client.database("myDatabase").container("myContainer");
141141
const sprocId = "spCreateToDoItem";
142-
await container.storedProcedures.create({
142+
await container.scripts.storedProcedures.create({
143143
id: sprocId,
144144
body: require(`../js/${sprocId}`)
145145
});
@@ -156,7 +156,7 @@ const newItem = [{
156156
}];
157157
const container = client.database("myDatabase").container("myContainer");
158158
const sprocId = "spCreateToDoItem";
159-
const {body: result} = await container.storedProcedure(sprocId).execute(newItem, {partitionKey: newItem[0].category});
159+
const {body: result} = await container.scripts.storedProcedure(sprocId).execute(newItem, {partitionKey: newItem[0].category});
160160
```
161161

162162
### Stored procedures - Python SDK

articles/cosmos-db/sql-query-order-by.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ ORDER BY <sort_specification>
4545
## Remarks
4646

4747
The ORDER BY clause requires that the indexing policy include an index for the fields being sorted. The Azure Cosmos DB query runtime supports sorting against a property name and not against computed properties. Azure Cosmos DB supports multiple ORDER BY properties. In order to run a query with multiple ORDER BY properties, you should define a [composite index](index-policy.md#composite-indexes) on the fields being sorted.
48+
49+
> [!Note]
50+
> When using the .NET SDK 3.4.0 or above, if the properties being sorted against might be undefined for some documents then you need to explicitly create an index on those properties. The default indexing policy will not allow for the retrieval of the documents where the sort property is undefined.
4851
4952
## Examples
5053

0 commit comments

Comments
 (0)