Parameter | Type | Default | Required | Description |
---|---|---|---|---|
name | str | 'dynamic_results' | False | Name for this specific stage. Used on the intermediate and final parameters. |
for_clause | str | 'default' | False | For clause. |
title | Optional[DynamicField] | - | False | Title information. |
sub_title | Optional[DynamicField] | - | False | Subtitle information. |
thumbnail | Optional[Union[ImageField]] | - | False | Thumbnail information. |
header | Optional[list[list[DynamicField]]] | [] | False | Header information as a grid (list of lists). |
body | Optional[list[list[DynamicField]]] | [] | False | Body information as a grid (list of lists). |
metadata | Optional[SectionFormat] | - | False | Metadata information. |
search_response | str | - | True | Name of the key in the final result in which query results will be stored. |
non_displayed_fields | Optional[list[NonDisplayField]] | - | False | List of fields to add as part of the UI response. |
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
field | str | - | True | Field name or path to the field from which to fetch the data. |
alias | Optional[str] | - | False | Alias to assign to the fetched values. If not specified, the field or path will be used as the name. |
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
fields | list[DynamicField] | - | True | List of dynamic fields. |
sort | Union[bool, SortOrder] | False | False | Sorting option for the fields. |
This stage does not require intermediate parameters since it takes the information it needs from the final using the search stage name.
_dynamic_results = DynamicResultsStage( engine_name=DEFAULT_ENGINE_NAME, enable=True, name='hits', title=UrlField(field='title', link='url'), sub_title=TextField(field='url'), thumbnail=None, non_displayed_fields=[], body=[ [BoolField(label='Adult', field='adult'), NumberField(label='Popularity', field='metadata.popularity', format='1.2')], [TextField(field='overview')], [TextField(label='Status', field='status'), DateField(label='Release Date', field='release_date', format='%Y-%m-%d')], [ThumbnailsField(field='metadata.cast[*].profile_path_w185', alt='metadata.cast[*].name', detail='metadata.cast[*].name', full_size='metadata.cast[*].profile_path')] ], search_response=SEARCH_STAGE_NAME )