Skip to content

Commit

Permalink
Merge pull request #337 from getsolaris/main
Browse files Browse the repository at this point in the history
feat: add nested/has_child inner_hits
  • Loading branch information
jacobwgillespie authored Aug 13, 2024
2 parents ab98383 + df83dbb commit 366b88d
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/types/queries.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Coordinate, PrimitiveValue, PrimitiveValueArray, Script} from './common'
import {Coordinate, PrimitiveValue, PrimitiveValueArray, Script, Sort} from './common'

// Match all queries

Expand Down Expand Up @@ -460,6 +460,19 @@ export interface NestedQuery {
query: Query
score_mode?: 'avg' | 'sum' | 'min' | 'max' | 'none'
ignore_unmapped?: boolean
inner_hits?: {
_source?:
| false
| string
| string[]
| {includes: string[]}
| {excludes: string[]}
| {includes: string[]; excludes: string[]}
size?: number
sort?: Sort
from?: number
name?: string
}[]
}
}

Expand All @@ -471,6 +484,19 @@ export interface HasChildQuery {
min_children?: number
max_children?: number
ignore_unmapped?: boolean
inner_hits?: {
_source?:
| false
| string
| string[]
| {includes: string[]}
| {excludes: string[]}
| {includes: string[]; excludes: string[]}
size?: number
sort?: Sort
from?: number
name?: string
}[]
}
}

Expand Down

0 comments on commit 366b88d

Please sign in to comment.