Skip to content

Commit 82f766d

Browse files
add ids parameter to GET and POST (#3208)
1 parent cd0905a commit 82f766d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reference/api/documents.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Use `offset` and `limit` to browse through documents.
3636
| **`fields`** | Array of strings/`null` | `*` | Document attributes to show (case-sensitive, comma-separated) |
3737
| **`filter`** | String/Array of array of strings/`null` | N/A | Refine results based on attributes in the `filterableAttributes` list |
3838
| **`retrieveVectors`** | Boolean | `false` | Return document vector data with search result |
39+
| **`ids`** | Array of primary keys | `null` | Return documents based on their primary keys |
3940

4041
<Capsule intent="note">
4142
Sending an empty payload (`--data-binary '{}'`) will return all documents in the index.
@@ -50,6 +51,10 @@ Sending an empty payload (`--data-binary '{}'`) will return all documents in the
5051
| **`limit`** | Integer | Number of documents returned |
5152
| **`total`** | Integer | Total number of documents in the index |
5253

54+
<Capsule intent="note" title="Returned document order">
55+
`/indexes/{index_uid}/documents/fetch` and `/indexes/{index_uid}/documents` responses do not return documents following the order of their primary keys.
56+
</Capsule>
57+
5358
### Example
5459

5560
<CodeSamples id="get_documents_post_1" />
@@ -118,6 +123,7 @@ Using the query parameters `offset` and `limit`, you can browse through all your
118123
| **`fields`** | `*` | Document attributes to show (case-sensitive, comma-separated) |
119124
| **`filter`** | N/A | Refine results based on attributes in the `filterableAttributes` list |
120125
| **`retrieveVectors`** | `false` | Return document vector data with search result |
126+
| **`ids`** | `null` | Return documents based on their primary keys |
121127

122128
### Response
123129

@@ -128,6 +134,10 @@ Using the query parameters `offset` and `limit`, you can browse through all your
128134
| **`limit`** | Integer | Number of documents returned |
129135
| **`total`** | Integer | Total number of documents in the index |
130136

137+
<Capsule intent="note" title="Returned document order">
138+
`/indexes/{index_uid}/documents/fetch` and `/indexes/{index_uid}/documents` responses do not return documents following the order of their primary keys.
139+
</Capsule>
140+
131141
### Example
132142

133143
<CodeSamples id="get_documents_1" />

0 commit comments

Comments
 (0)