Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

redux-search

> 编程语言
Open source

Redux bindings for client-side search

1.4K stars0 likes2 views
WebsiteGitHub

About

Redux bindings for client-side search

redux-search

Higher-order Redux library for searching collections of objects. Search algorithms powered by js-worker-search.

Check out the live demo at bvaughn.github.io/redux-search

Or install it yourself with NPM:

npm install --save redux-search

Overview

This README provides a quick introduction of redux-search. For more details refer to the API documentation.

redux-search searches collections of documents and returns results as an Array of document ids. It is important to note that the documents themselves aren't returned. This is because the actual search is performed in a web-worker thread for performance reasons. In order to avoid serializing the documents and passing them back and forth, redux-search simply passes their ids.

Because of this, each document must contain an id attribute.

redux-search provides an action for searching resources as well as selectors for getting search results and the current search text. It then watches the store for resource changes and automatically updates search results as needed.

Note that redux-search currently depends on the Regenerator runtime. It is recommended that your project require the babel-polyfill to provide that runtime.

Example

Configuring the Store

redux-search watches the store for changes to searchable collections and automatically builds a search index. To do this, it simply needs to be told which resources to watch and which fields to index.

…

Customizing Search Index

By default, redux-search builds an index to match all substrings. You can override this behavior by providing your own, pre-configured searchApi param to the middleware like so:

…

Custom word boundaries (tokenization), case-sensitivity and partial token matching

You can also pass parameters to the SearchApi constructor that customize the way the search splits up the text into words (tokenizes), change the search from the default case-insensitive to case-sensitive and/or enable matching on any search token (changing the search filtering from AND to OR):

…

Connecting a Component

redux-search provides selectors and action-creators for easily connecting components with the search state. For example, using reselect you might connect your component like so:

…

Changelog

Changes are tracked in the changelog.

License

redux-search is available under the MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptmiddlewarereduxresourcessearch

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言