Field Notes · Issue 01 · October 2026A live demo of kiara-ts, running in your browser
Run the live demo
FeatureSearch engineering

Your users choose the filters. Should you design an index for every combination?

Kiara is an open-source, in-memory search library for Java and TypeScript. Load your records, call prepare() once, and search by any mix of fields, with typo correction and type-ahead built in.

  • Free and open source
  • Zero dependencies
  • Java 8+ and TypeScript
  • Runs in the browser
A developer at work. Video: Mixkit
Three fields equal, 100,000 records 0.16 ms Fuse.js: 41 ms Published benchmark, see below
In focusData structures

Ten filter fields. 1,023 possible combinations.

Every field you add to a filter panel doubles the combinations users can pick. Exact-key lookups need one key per combination. Composite indexes cut that down, but each one only serves its leading columns.

Kiara keeps one index per field and joins them at query time. Records are stored as paths in a tree, nodes are numbered, and conditions combine with integer range checks.

1,023exact-key lookups needed for 10 fields
252composite ordered indexes, each limited to its leading columns
10per-field indexes, combined per query. This is Kiara's approach, built by one prepare() call.

Source: "Your data has 10 attributes...", KapoorLabs on dev.to

Looking closer at the data. Video: Mixkit

Any field. Any mix. One prepare() call.Footage inside the type: Mixkit

Explainer

Three things a plain loop can't do.

A hand-written filter can match exact values. Users type faster and less carefully than that.

"wireles keybord" still finds wireless keyboards.

Fields marked oneEditAway can fix one wrong, missing or extra letter per word. It doesn't catch every typo, and one near the start of a word often stays uncorrected. The result tells you what was corrected, so your interface can show it.

Plurals work too. Keep a stemmed copy of the field and search both, so "laptops" finds laptop and the typo fixes still work.

keyword-search.tsexample
// one field for typos, a stemmed copy for plurals
textField("name", { oneEditAway: true })
textField("nameStem", { stemmedIndex: true })

keywordSearch.bestMatch("wireles keybord", {
  fields: ["name", "nameStem"],
})
// correctedKeywords:
{ wireles: "wireless", keybord: "keyboard" }
LiveTry it yourself

Type badly. Filter freely. Watch the clock.

10,000 example products, searched by the real kiara-ts library inside your browser. Nothing is sent anywhere.

Brand
Color
Price and rating
Tags
Loading... – ms
The query you just ran

        
AnalysisBenchmarks

Measured against Fuse.js on 100,000 records.

Median query time, lower is better. Kiara won all 16 scenarios both libraries can run at this size. The bars use a log scale, because the gap is too wide for a straight one.

Kiara (kiara-ts 1.2.1)Fuse.js
0.01 ms0.11101001,000 ms
Where Fuse.js wins: build time0.23 s for Fuse.js, 4.0 s for Kiara to prepare 100,000 records.
Where Fuse.js wins: memory110 MB for Fuse.js, 477 MB for Kiara's prepared indexes.
Choosing between themFuse.js suits fast-changing data and looser fuzzy matching. Kiara suits read-heavy data with many filter combinations.

Source: KapoorLabs benchmark on GitHub. One machine, mostly synthetic data, median of three isolated runs. Your results will differ.

Handwritten notes on a desk Developers working together at laptops From research notes to a library developers use. Photos: Unsplash
Behind the library

Built from a research paper. Tested like infrastructure.

  • 2020The algorithm comes from a research paper by the library's author.
  • 461Tests passing in the Java library, with CI on Java 8, 11, 17, 21 and 25.
  • 0Runtime dependencies in the TypeScript library.
  • 2Licenses, both permissive: Apache-2.0 for Java, MIT for TypeScript.

The docs also say clearly when not to use it: frequent writes, durable storage or relational joins.

  1. 1

    Describe your fields

    A schema or decorators. textField("name")

  2. 2

    Load and prepare

    One call builds every index. store.prepare()

  3. 3

    Search any combination

    In the browser or on a Java server. store.search([...])

Fit check

Is Kiara right for your data?

Five questions, about one minute. If another tool fits your case better, it says so.

Step 1 of 5About 1 minute
Your answers stay in this page. Nothing is sent or stored.
Questions

Before you try it.

Next step

Try it first. Then decide.

The demo runs in your browser in seconds. If it fits your data, the code is one install away, and the authors want to hear what you build.

Run the live demo →