WorkflowSearchSchema: Record<string, {
    enum?: string[];
    examples?: string[];
    fieldName?: string;
    indexed?: boolean;
    nilable?: boolean;
    noindex?: boolean;
    nostem?: boolean;
    pattern?: string;
    primitive?:
        | "string"
        | "number"
        | "boolean"
        | "array"
        | "object";
    required?: boolean;
    sortable?: boolean;
    type: "TEXT" | "NUMERIC" | "TAG";
}>

The schema for the full-text-search (RediSearch) index.

Type declaration

  • Optionalenum?: string[]

    an enumerated list of allowed values; if field is nilable, it is implied and therefore not necessary to include null in the list

    []
    
  • Optionalexamples?: string[]

    An array of possible values for the field

  • OptionalfieldName?: string

    literal value to use for the indexed field name (without including the standard underscore (_) prefix isolate)

  • Optionalindexed?: boolean

    if true, the field is indexed and searchable within the FT.SEARCH index This is different from noindex which is FT.SEARCH specific and relates to sorting and indexing. This is a general flag for the field that will enable or disable indexing and searching entirely. Use for fields with absolutely no meaning to query or sorting but which are important nonetheless as part of the data record that is saved and returned.

    true
    
  • Optionalnilable?: boolean

    The 'nilable' setting may NOT be set to true for NUMBER types as it causes an indexing error; consider a custom (e.g., negative number) value to represent null if desired for a NUMERIC field. Set to true only if the field is a TEXT or TAG type and you wish to save the string null as a value to search on (the tag, {null}, or the string, (null)

    false
    
  • Optionalnoindex?: boolean

    FT.SEARCH NOINDEX field. If true and if the field is sortable, the field will aid in sorting results but not be directly indexed as a standalone

    false
    
  • Optionalnostem?: boolean

    FT.SEARCH NOSTEM field. applies to TEXT fields types. If true, the text field index will not stem words

    false
    
  • Optionalpattern?: string

    a regular expression pattern for the field

    '.*'
    
    '^[a-zA-Z0-9_]*$'
    
  • Optionalprimitive?:
        | "string"
        | "number"
        | "boolean"
        | "array"
        | "object"

    possible scalar/primitive types for the field. Use when serializing and restoring data to ensure the field is properly typed. If not provided, the field will be treated as a string.

  • Optionalrequired?: boolean

    if true, the field is required to be present in the data record

    false
    
  • Optionalsortable?: boolean

    FT.SEARCH SORTABLE field. If true, results may be sorted according to this field

    false
    
  • type: "TEXT" | "NUMERIC" | "TAG"

    The FT.SEARCH field type. One of: TEXT, NUMERIC, TAG. TEXT is most expensive, but also most expressive.