Hasty Briefsbeta

Bilingual

Show HN: Front End Fuzzy and Substring and Prefix Search

6 months ago
  • #frontend-library
  • #fuzzy-search
  • #search-algorithm
  • @m31coding/fuzzy-search is a frontend library for fast and accurate fuzzy searching of entities by their names and features.
  • Key features include speed (<10 ms queries), accuracy (suffix array and n-grams), multilingual support, flexibility (CRUD operations), reliability (no dependencies), and universal compatibility (frontend and Node.js).
  • Install via npm: `npm install @m31coding/fuzzy-search` with various module formats available (ESM, CommonJS, UMD, etc.).
  • Basic usage involves creating a searcher with `SearcherFactory`, indexing entities, and querying with `getMatches`.
  • Supports dynamic updates with `upsertEntities` and `removeEntities`, and handles large datasets efficiently.
  • Customizable normalization pipeline for handling different languages and scripts, with default settings optimized for Latin scripts.
  • Advanced search techniques include n-grams with character sorting for transposition errors and quality penalties for inexact matches.
  • Substring and prefix searches use a suffix array with quality offsets to prioritize matches.
  • Configuration options allow tuning for specific needs, such as handling non-Latin scripts or large datasets.
  • Open-source and free, contributions and feedback are welcome via GitHub issues.