Querylight TS Demo

Documentation

Browse the static Querylight TS documentation pages or use the interactive search experience.

Documentation

Static article pages

Use the interactive search on the home page, or browse documentation entries directly below.

Analysis

Analyzer and Tokenization Deep Dive

Understand how tokenization and token filters change matching behavior, recall, and precision.

Analysis

Analyzers, Tokenizers, and Filters

Normalization is explicit, so you can tailor indexing and querying behavior per field.

Other Features

Approximate Nearest Neighbor Vector Search

Use VectorFieldIndex and bigramVector for lightweight semantic-ish lookup.

Demo Internals

Article Length Facets in the Demo

How the demo calculates article word count, builds numeric buckets, and turns them into live sidebar filters.

Demo Internals

Ask the Docs End to End

How the demo builds semantic embeddings, ships them to the browser, and answers natural-language questions locally.

Discovery

Avg Aggregation

Compute the arithmetic mean of indexed numeric or date values, optionally within the current result set.

Lexical Querying

BoolQuery for Must, Should, Filter, MustNot, and MinimumShouldMatch

Blend ranking clauses with strict filters, exclusions, and optional should-logic in one request.

Lexical Querying

BoostingQuery for Soft Demotion Instead of Hard Exclusion

Keep relevant documents in the results while pushing down candidates that carry undesirable signals.

Guides

Build Interactive ECharts Dashboards from Plain JSON

Use Querylight TS to turn plain JSON records into the filtered series and buckets that Apache ECharts expects.

Schema

Choosing a Schema for Search

Model titles, body text, filters, tags, and helper fields so search behavior stays predictable.

Overview

Comparing Querylight TS to Other Browser Search Libraries

A practical overview of strengths and weak points for Querylight TS, Fuse.js, Lunr, MiniSearch, FlexSearch, Pagefind, and Orama.

Discovery

Date Histogram Aggregation

Bucket date fields into fixed-width time intervals for timelines and recency views.

Lexical Querying

DisMaxQuery for Best-Field Matching with Tie Breakers

Prefer the strongest matching clause while still giving partial credit to secondary matches.

Ranking

DistanceFeatureQuery for Recency and Numeric Closeness

Boost documents by how close a numeric or date field is to an origin value.

Other Features

Document Chunking Strategies

Split long documents into meaningful sections so lexical retrieval, highlighting, and vector search stay focused.

Overview

Documentation Index

A section-by-section map of the Querylight TS documentation.

Guides

From Raw API Payloads to Browser Dashboards

A practical pattern for turning raw API responses into local-first dashboard interactions with Querylight TS.

Other Features

Geo Indexing with Points and Polygons

Store GeoJSON and query by point containment or polygon intersection.

Overview

Getting Started with Browser Search

Build a practical search box quickly with either the beginner helper or the equivalent manual setup.

Other Features

Highlighting with Querylight TS

Generate exact, phrase, prefix, and fuzzy highlight fragments after retrieval using stored source offsets.

Discovery

Histogram Aggregation

Bucket numeric fields into regular fixed-width intervals for charts and sidebar facets.

Demo Internals

How the Aggregations Sidebar Works

How the demo calculates live text facets, word-count buckets, and significant terms for the right-hand sidebar.

Guides

How To Build Autocomplete

Use prefix-friendly fields, compact suggestion text, and stable ranking for search-as-you-type.

Guides

How To Build Faceted Navigation

Use text, numeric, and date aggregations over the current hit set to drive filters, counts, and exploratory navigation.

Overview

Introducing Querylight TS

Why this TypeScript port exists, who it is for, and where it fits relative to established search tools.

Demo Internals

Lazy Indexing in the Dashboard Demo

How the dashboard route delays index construction until a section is actually viewed.

Discovery

Max Aggregation

Get the largest indexed numeric or date value, optionally restricted to the current result set.

Discovery

Min Aggregation

Get the smallest indexed numeric or date value, optionally restricted to the current result set.

Discovery

Numeric and Date Aggregations

A map of the numeric and date aggregation helpers available on NumericFieldIndex and DateFieldIndex.

Indexing

NumericFieldIndex and DateFieldIndex for Structured Features

Map numeric and date fields explicitly so range queries, ranking features, and aggregations behave predictably.

Overview

Other Work Related to Querylight TS

A map of adjacent projects by Jilles van Gurp around search, ranking, Elasticsearch, geo, and DSL tooling.

Operations

Performance and Memory Tuning

Control index size and query cost by choosing fields, analyzers, and precomputation strategies carefully.

Lexical Querying

Phrase Search and Slop

Match analyzed terms in sequence, with optional movement tolerance.

Indexing

Portable JSON Index State

Serialize index structures and hydrate them again without reindexing.

Discovery

Range Aggregation

Bucket numeric or date fields into explicit ranges for faceting and filtered navigation.

Lexical Querying

RangeQuery Over Lexical Fields

Filter sortable string terms with gt, gte, lt, and lte boundaries.

Ranking

RankFeatureQuery for Numeric Relevance Signals

Boost documents with numeric features such as popularity, clicks, or quality scores.

Guides

Real-World Recipes

Practical patterns for docs search, blog search, product filtering, related content, and lightweight semantic retrieval.

Ranking

Reciprocal Rank Fusion

Combine multiple ranked result lists from lexical, filtered, geo, or vector search.

Lexical Querying

RegexpQuery for Term-Level Regular Expressions

Match indexed terms with JavaScript regular expressions when wildcard patterns are not expressive enough.

Ranking

Relevance Tuning with BM25, TF-IDF, and RRF

Choose ranking strategies deliberately and combine lexical, field, feature, and scripted signals without losing control.

Lexical Querying

ScriptQuery for Custom JavaScript Filters

Filter documents with a JavaScript function when built-in query classes do not express the rule cleanly.

Ranking

ScriptScoreQuery for Custom JavaScript Scoring

Rescore matching documents with a JavaScript function that combines `_score` with your own business logic.

Overview

Search Engine Techniques for Analytics UIs

How search-style filtering and aggregation patterns translate naturally into exploratory analytics interfaces.

Indexing

Serialization, Hydration, and Shipping Indexes

Prebuild index state, ship JSON to the client, and rehydrate fast without reindexing in the browser.

Other Features

SimpleTextSearch for Plain JSON Documents

A beginner path that builds a usable index from plain objects and runs a good-enough default search.

Guides

Slicing and Dicing Open Data with Querylight TS

Use small open-data snapshots to prototype interactive analytics in the browser with Querylight TS.

Discovery

Stats Aggregation

Get count, min, max, sum, and average from a numeric or date field in one call.

Discovery

Sum Aggregation

Add up all indexed numeric or date values in a field, optionally within a filtered subset.

Lexical Querying

Term, Terms, Prefix, Exists, and Match Queries

Use exact term lookups, field existence checks, prefix lookup, or analyzed text matching.

Discovery

Terms Aggregation and Significant Terms

Build term facets from the current result set and surface discriminative vocabulary.

Operations

Testing Patterns from the Repository

The test suite documents expected ranking, query, vector, and geo behavior.

Operations

Testing Search Behavior

Write tests around ranking, filtering, edge cases, and representative user queries instead of only API smoke tests.

Ranking

TF-IDF and BM25 Ranking

Choose between classic term weighting and Lucene-style BM25 scoring.

Indexing

Trie-Backed Prefix Expansion

Autocomplete-style search is built from indexed terms.

Guides

Using Querylight TS as a Local Analytics Engine

How to use Querylight TS filtering and aggregation primitives for browser-side analytics over plain JSON records.

Discovery

Value Count Aggregation

Count how many numeric or date values are indexed, optionally within the current result set.

Other Features

Vector Rescoring for Faster Hybrid Search

Rescore only the top lexical candidates with vectors when full vector retrieval would be too broad or too slow.

Overview

What Querylight TS Can Do Beyond Full-Text Search

Querylight TS can power more than lexical retrieval, including faceting, aggregations, semantic retrieval, geo filtering, and lightweight dashboards.

Overview

What Querylight TS Covers

A compact browser and Node.js search toolkit for structured, explainable retrieval.

Overview

Why Local-First Data Exploration Helps API Prototyping

Explore raw API payloads locally before committing to a larger backend analytics architecture.

Lexical Querying

WildcardQuery for Term-Level Pattern Matching

Match indexed terms with `*` and `?` patterns without switching to full-text analysis.