Function getDefaultValue

Returns the default value of an option. It will throw an error if no option with the given name exists.

// Get default tokenizer
getDefaultValue('tokenize')

// Get default term processor
getDefaultValue('processTerm')

// Unknown options will throw an error
getDefaultValue('notExisting')
// => throws 'SlimSearch: unknown option "notExisting"'
  • Parameters

    • optionName: string

      Name of the option

    Returns unknown

    The default value of the given option