Skip to content

Commit 37056a6

Browse files
add requestUid to search responses
1 parent 33ef2db commit 37056a6

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

reference/api/multi_search.mdx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ Each search result object is composed of the following fields:
215215
| **`facetStats`** | Object | [The numeric `min` and `max` values per facet](/reference/api/search#facetstats) |
216216
| **`processingTimeMs`** | Number | Processing time of the query |
217217
| **`query`** | String | Query originating the response |
218+
| **`requestUid`** | String | A UUID v7 identifying the request |
218219

219220
#### Federated multi-search requests
220221

@@ -232,6 +233,7 @@ Federated search requests return a single object and the following fields:
232233
| **`facetDistribution`** | Object | [Distribution of the given facets](#mergefacets) |
233234
| **`facetStats`** | Object | [The numeric `min` and `max` values per facet](#mergefacets) |
234235
| **`remoteErrors`** | Object | Indicates which remote requests failed and why |
236+
| **`requestUid`** | String | A UUID v7 identifying the request |
235237

236238
Each result in the `hits` array contains an additional `_federation` field with the following fields:
237239

@@ -267,7 +269,8 @@ Each result in the `hits` array contains an additional `_federation` field with
267269
"processingTimeMs": 26,
268270
"limit": 5,
269271
"offset": 0,
270-
"estimatedTotalHits": 22
272+
"estimatedTotalHits": 22,
273+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
271274
},
272275
{
273276
"indexUid": "movies",
@@ -283,7 +286,8 @@ Each result in the `hits` array contains an additional `_federation` field with
283286
"processingTimeMs": 5,
284287
"limit": 5,
285288
"offset": 0,
286-
"estimatedTotalHits": 11
289+
"estimatedTotalHits": 11,
290+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
287291
},
288292
{
289293
"indexUid": "movie_ratings",
@@ -298,7 +302,8 @@ Each result in the `hits` array contains an additional `_federation` field with
298302
"processingTimeMs": 0,
299303
"limit": 20,
300304
"offset": 0,
301-
"estimatedTotalHits": 1
305+
"estimatedTotalHits": 1,
306+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
302307
}
303308
]
304309
}
@@ -337,7 +342,8 @@ Each result in the `hits` array contains an additional `_federation` field with
337342
"limit": 20,
338343
"offset": 0,
339344
"estimatedTotalHits": 2,
340-
"semanticHitCount": 0
345+
"semanticHitCount": 0,
346+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
341347
}
342348
```
343349

@@ -378,6 +384,7 @@ Each result in the `hits` array contains an additional `_federation` field with
378384
"limit": 5,
379385
"offset": 0,
380386
"estimatedTotalHits": 111,
387+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1",
381388
"remoteErrors": {
382389
"ms-02": {
383390
"message": "error sending request",

reference/api/search.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ By default, [this endpoint returns a maximum of 1000 results](/learn/resources/k
117117
| **`facetStats`** | Object | [The numeric `min` and `max` values per facet](#facetstats) |
118118
| **`processingTimeMs`** | Number | Processing time of the query |
119119
| **`query`** | String | Query originating the response |
120+
| **`requestUid`** | String | A UUID v7 identifying the request |
120121

121122
#### Exhaustive and estimated total number of search results
122123

@@ -157,7 +158,8 @@ You can [read more about pagination in our dedicated guide](/guides/front_end/pa
157158
"limit": 20,
158159
"estimatedTotalHits": 976,
159160
"processingTimeMs": 35,
160-
"query": "american "
161+
"query": "american",
162+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
161163
}
162164
```
163165

@@ -230,6 +232,7 @@ By default, [this endpoint returns a maximum of 1000 results](/learn/resources/k
230232
| **`facetStats`** | Object | [The numeric `min` and `max` values per facet](#facetstats) |
231233
| **`processingTimeMs`** | Number | Processing time of the query |
232234
| **`query`** | String | Query originating the response |
235+
| **`requestUid`** | String | A UUID v7 identifying the request |
233236

234237
### Example
235238

@@ -260,7 +263,8 @@ By default, [this endpoint returns a maximum of 1000 results](/learn/resources/k
260263
"limit": 20,
261264
"estimatedTotalHits": 976,
262265
"processingTimeMs": 35,
263-
"query": "american "
266+
"query": "american",
267+
"requestUid": "0198e71e-47d2-7cd3-b507-1d0cc930b1f1"
264268
}
265269
```
266270

0 commit comments

Comments
 (0)