This might be the first step for extensibility features of #1.
I added a custom customFilters parameter to the buildQueryBodyFromSearchQuery method to add custom filters. This filters can be used like (important is the custom key to identify as custom filter):
searchQuery.applyFilter({ key: 'custom', value: 'filter_name', options: { /* More complex options here */ } })
And the methods given to this customFilters parameter get a payload of parameters and work like:
({ name, options, queryChain, config }) => {
// Do your custom filter stuff with the queryChain
return queryChain
}
This might be the first step for extensibility features of #1.
I added a custom
customFilters
parameter to thebuildQueryBodyFromSearchQuery
method to add custom filters. This filters can be used like (important is thecustom
key to identify as custom filter):And the methods given to this
customFilters
parameter get a payload of parameters and work like: