Class: AdvancedSearchParser<SearchCategory, SearchFilterType>

searchParser.AdvancedSearchParser

Type parameters #

Name Type
SearchCategory extends string = string
SearchFilterType extends string = string

Hierarchy #

Constructors #

constructor #

new AdvancedSearchParser<SearchCategory, SearchFilterType>(options?)

Type parameters #

Name Type
SearchCategory extends string = string
SearchFilterType extends string = string

Parameters #

Name Type
options? Object
options.additionalQueryPartParsers QueryPartParser<SearchCategory, SearchFilterType>[]
options.enableCategoryParsing? boolean
options.enableFilterParsing? boolean
options.searchCategoryAliases? AliasMap<SearchCategory>
options.searchFilterAliases? AliasMap<string>

Overrides #

AbstractSearchParser.constructor

Defined in #

searchParser/AdvancedSearchParser.ts:22

Methods #

parseSearchQuery #

parseSearchQuery(rawSearchQuery): undefined | ParsedSearchQuery<SearchCategory, SearchFilterType>

Parses the raw search query text into the search text and possibly search filters and categories

Parameters #

Name Type Description
rawSearchQuery string the raw search query text to parse

Returns #

undefined | ParsedSearchQuery<SearchCategory, SearchFilterType>

Overrides #

AbstractSearchParser.parseSearchQuery

Defined in #

searchParser/AdvancedSearchParser.ts:38