The Inner Hits Field is used for nested field matches in Elasticsearch or OpenSearch, this field allows you to display the hit with its corresponding inner hits.
InnerHitsField
Parameter | Type | Default | Required | Description |
---|
field | str | - | True | Name of the inner_hits |
body_grid | Optional[list[list[DynamicField]]] | None | False | Body defined in a grid (list of lists) |
body_list | Optional[list[DynamicField]] | None | False | Body defined as a single list |
default | Any | None | True | Default value (Excluded from documentation) |
...
Parameter | Type | Default | Required | Description |
---|
type | DynamicFieldType | INNER_HITS | True | Type of the dynamic field. |
display | Optional[List[Any]] | None | False | List of items to display. |
Example Configuration
Code Block |
---|
|
InnerHits(field='field', body_grid=[
[TextField(...), UrlField(...), BoolField(...)],
[TextField(...), BoolField],
.
.
.
],
)
or
InnerHits(field='field', body_list=[TextField(...), UrlField(...), BoolField(...), ...]) |