A lightweight full-text indexing and searching library designed for dynamic document sets stored on disk (IndexedDB).
ndx is a lightweight full-text indexing and searching library designed for dynamic document sets stored on disk, such as in IndexedDB. It enables efficient search with BM25 ranking and supports multiple fields with configurable boosting, but focuses on disjunction-based queries rather than phrase matching.
JavaScript developers building applications that require client-side or local full-text search with dynamic document updates, particularly those using IndexedDB for storage.
Developers choose ndx for its simplicity, efficiency in handling dynamic document additions/removals, and BM25-based relevance ranking, making it ideal for specific use cases where documents are stored locally and need fast, configurable search without server dependencies.
:mag: Full text indexing and searching library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Designed for scenarios where documents are dynamically added or removed, using a trie-based inverted index that handles updates without full reindexing, as highlighted in the README for IndexedDB use cases.
Implements the BM25 ranking function to score documents based on term frequency and document length, providing high-quality relevance results compared to simpler methods.
Supports indexing multiple fields with per-field boost factors, allowing developers to fine-tune search relevance, as shown in the example with fieldBoostFactors arrays.
Focuses on core functionality without bloat, making it easy to integrate for specific use cases like client-side search, with a minimal API as demonstrated in the code snippets.
Only supports disjunction operators (OR logic) and cannot handle phrase searches or conjunction queries, a limitation explicitly admitted in the README which restricts advanced search features.
Requires explicit calls to indexVacuum to clean up removed documents, which can lead to bloated indexes if neglected, adding overhead for developers managing dynamic data.
Lacks provided tokenizers or filters, forcing reliance on external libraries like Natural for text processing, increasing integration complexity and setup time.