You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

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

ParameterTypeDefaultRequiredDescription
fieldstr-TrueName of the inner_hits
body_gridOptional[list[list[DynamicField]]]NoneFalseBody defined in a grid (list of lists)
body_listOptional[list[DynamicField]]NoneFalseBody defined as a single list
defaultAnyNoneTrueDefault value (Excluded from documentation)

_InnerHitsFieldUI

ParameterTypeDefaultRequiredDescription
typeDynamicFieldTypeINNER_HITSTrueType of the dynamic field.
displayOptional[List[Any]]NoneFalseList of items to display.


Example Configuration

InnerHits(field='field', 
	body_grid=[
		[TextField(...), UrlField(...), BoolField(...)],
		[TextField(...), BoolField],
		.
		.
		.
	],
)
or
InnerHits(field='field', body_list=[TextField(...), UrlField(...), BoolField(...), ...])
  • No labels