@coveo/headless
    Preparing search index...

    Interface FieldActionCreators

    The field action creators.

    See Dispatch actions.

    interface FieldActionCreators {
        disableFetchAllFields(): { payload: void; type: string };
        enableFetchAllFields(): { payload: void; type: string };
        fetchFieldsDescription(): AsyncThunkAction<
            FieldDescription[],
            void,
            AsyncThunkSearchOptions<ConfigurationSection>,
        >;
        registerFieldsToInclude(
            fields: string[],
        ): { payload: string[]; type: string };
    }
    Index

    Methods

    • 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 { payload: void; type: string }

      A dispatchable action.

    • Registers the fields to include in the query response.

      Parameters

      • fields: string[]

        The target fields (e.g., ["field1", "field2"]).

      Returns { payload: string[]; type: string }

      A dispatchable action.