redux-search v2.5.0 Release Notes

Release Date: 2018-12-03 // over 2 years ago
  • ➕ Added support for optional OR searches (documents matching only some of the search tokens) (@dlebech - #82)

Previous changes from v2.4.0

  • ➕ Added support for custom tokenize patterns and case-sensitive searches (supported in js-worker-search version 1.1.3). Usage is similar to index mode: To override the defaults (tokenize on whitespace only and case-insensitive), pass a configured SearchApi argument to the reduxSearch middleware, like so:

    import { reduxSearch, SearchApi } from 'redux-search'
    const finalCreateStore = compose(
      // Other middleware ...
        resourceIndexes: { ... },
        resourceSelector: (resourceName, state) => state.resources.get(resourceName),
        searchApi: new SearchApi({
          // split on all non-alphanumeric characters,
          // so this/that gets split to ['this','that'], for example
          tokenizePattern: /[^a-z0-9]+/,
          // make the search case-sensitive
          caseSensitive: true