Skip to content

Commit 685d17b

Browse files
authored
HitsMetadata.total is not present if track_total_hits == false
1 parent ff40cfc commit 685d17b

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

output/schema/schema.json

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/search/_types/hits.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export class Hit<TDocument> {
6060
}
6161

6262
export class HitsMetadata<T> {
63-
total: TotalHits | long
63+
/** Total hit count information, present only if `track_total_hits` wasn't `false` in the search request. */
64+
total?: TotalHits | long
6465
hits: Hit<T>[]
6566

6667
max_score?: double | null

0 commit comments

Comments
 (0)