KiaraDB: Tree-Based Indexing for Multi-Field In-Memory Search in Java and TypeScript
In a database, you filter with a WHERE clause. With data already in memory, in a browser or a Node.js process, you usually write Array.filter callbacks, or bend a fuzzy-search library into a filter engine. Both work until users choose the filters. Five filters can be combined 31 ways; ten filters, 1,023. Each combination either scans every record or needs an index designed for it.
KiaraDB is an open-source in-memory search library, not a persistent database, built for that problem. You describe your fields, load your records, and call prepare() once to build the indexes. After that, any combination of fields is a single query, with typo correction and type-ahead for text.
KiaraDB is the project. It has two libraries with the same search behavior:
- Kiara for Java (Java 8+, Apache-2.0), for server-side services.
- kiara-ts for TypeScript(MIT, zero runtime dependencies), for browsers, Web Workers, and Node.js. A contract check...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE