Skip to content

Commit e0120f0

Browse files
committed
add order by composite index behavior
1 parent 830702b commit e0120f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about SQL ORDER BY clause for Azure Cosmos DB. Use SQL as an
44
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 02/12/2020
7+
ms.date: 04/17/2020
88
ms.author: tisande
99

1010
---
@@ -147,7 +147,7 @@ The results only include the document that has a defined `lastName`:
147147
]
148148
```
149149

150-
If we update the container's indexing policy to explicitly include a path for `lastName`, we will include documents with an undefined sort property in the query results. You must explicitly define the path to lead to this scalar value (and not beyond it). You should use the `?` character in your path definition in the indexing policy to ensure that you explicitly index the property `lastName` and no additional nested paths beyond it.
150+
If we update the container's indexing policy to explicitly include a path for `lastName`, we will include documents with an undefined sort property in the query results. You must explicitly define the path to lead to this scalar value (and not beyond it). You should use the `?` character in your path definition in the indexing policy to ensure that you explicitly index the property `lastName` and no additional nested paths beyond it. If your `Order By` query uses a [composite index](index-policy.md#composite-indexes), the results will always include documents with an undefined sort property in the query results.
151151

152152
Here is a sample indexing policy which allows you to have documents with an undefined `lastName` appear in the query results:
153153

0 commit comments

Comments
 (0)