FieldActions (Insight Engine)

This is for:

Developer

The field action creators.

Loader Function

loadFieldActions

Loads the fields reducer and returns possible action creators.

Parameters

  • engine: CoreEngine

    The headless engine.

Returns FieldActionCreators: The field action creators.

FieldActionCreators

disableFetchAllFields

Disable fetch all fields from the index.

Returns PayloadAction: A dispatchable action.

enableFetchAllFields

Enable fetch all fields from the index.

This should not be used in any production environment, as it can have a negative impact on query execution time.

Should be used for debugging purposes.

Returns PayloadAction: A dispatchable action.

fetchFieldsDescription

Fetch field descriptions from the index.

Returns AsyncThunkAction<FieldDescription[], void, AsyncThunkSearchOptions<ConfigurationSection>>: A dispatchable action.

registerFieldsToInclude

Registers the fields to include in the query response.

Parameters

  • fields: string[]

    The target fields (for example, ["field1", "field2"]).

Returns PayloadAction<string[]>: A dispatchable action.