Skip to content

Commit 366b88d

Browse files
Merge pull request #337 from getsolaris/main
feat: add nested/has_child inner_hits
2 parents ab98383 + df83dbb commit 366b88d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/types/queries.ts

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Coordinate, PrimitiveValue, PrimitiveValueArray, Script} from './common'
1+
import {Coordinate, PrimitiveValue, PrimitiveValueArray, Script, Sort} from './common'
22

33
// Match all queries
44

@@ -460,6 +460,19 @@ export interface NestedQuery {
460460
query: Query
461461
score_mode?: 'avg' | 'sum' | 'min' | 'max' | 'none'
462462
ignore_unmapped?: boolean
463+
inner_hits?: {
464+
_source?:
465+
| false
466+
| string
467+
| string[]
468+
| {includes: string[]}
469+
| {excludes: string[]}
470+
| {includes: string[]; excludes: string[]}
471+
size?: number
472+
sort?: Sort
473+
from?: number
474+
name?: string
475+
}[]
463476
}
464477
}
465478

@@ -471,6 +484,19 @@ export interface HasChildQuery {
471484
min_children?: number
472485
max_children?: number
473486
ignore_unmapped?: boolean
487+
inner_hits?: {
488+
_source?:
489+
| false
490+
| string
491+
| string[]
492+
| {includes: string[]}
493+
| {excludes: string[]}
494+
| {includes: string[]; excludes: string[]}
495+
size?: number
496+
sort?: Sort
497+
from?: number
498+
name?: string
499+
}[]
474500
}
475501
}
476502

0 commit comments

Comments
 (0)