Documentation
Static article pages
Use the interactive search on the home page, or browse documentation entries directly below.
API ReferenceGenerated symbol-level API docs
Browse TSDoc-backed reference pages for exported classes, interfaces, queries, helpers, and types.
AnalyzedToken
Token with original source offsets for highlighting and phrase work.
API ReferenceAnalyzer
Configurable analyzer pipeline used by text indexes and query parsing.
AnalysisAnalyzer and Tokenization Deep Dive
Understand how tokenization and token filters change matching behavior, recall, and precision.
AnalysisAnalyzers, Tokenizers, and Filters
Normalization is explicit, so you can tailor indexing and querying behavior per field.
API ReferenceandHits
Intersects two hit lists and adds scores for matching documents.
API ReferenceAPI Reference
Generated symbol-level API documentation for the published Querylight TS surface.
API ReferenceapplyBoost
Applies a multiplicative boost to every hit score.
Other FeaturesApproximate Nearest Neighbor Vector Search
Use VectorFieldIndex and bigramVector for lightweight semantic-ish lookup.
Demo InternalsArticle Length Facets in the Demo
How the demo calculates article word count, builds numeric buckets, and turns them into live sidebar filters.
Demo InternalsAsk the Docs End to End
How the demo builds semantic embeddings, ships them to the browser, and answers natural-language questions locally.
API ReferenceAsyncVectorScorer
Optional async scoring extension for backends such as WebGPU.
AggregationsAvg Aggregation
Compute the arithmetic mean of indexed numeric or date values, optionally within the current result set.
API ReferencebigramVector
Creates a fixed-size bigram-count vector from analyzed text or tokens.
API ReferenceBm25Config
BM25 scoring configuration.
API ReferenceBoolQuery
Boolean composition query with Elasticsearch-style should/must/filter/mustNot semantics.
Lexical QueryingBoolQuery for Must, Should, Filter, MustNot, and MinimumShouldMatch
Blend ranking clauses with strict filters, exclusions, and optional should-logic in one request.
API ReferenceBoolQueryParams
Parameters for constructing a BoolQuery.
API ReferenceBoostingQuery
Query wrapper that softly demotes hits matching a negative clause.
Lexical QueryingBoostingQuery for Soft Demotion Instead of Hard Exclusion
Keep relevant documents in the results while pushing down candidates that carry undesirable signals.
API ReferenceBoostingQueryParams
Parameters for constructing a BoostingQuery.
GuidesBuild Interactive ECharts Dashboards from Plain JSON
Use Querylight TS to turn plain JSON records into the filtered series and buckets that Apache ECharts expects.
SchemaChoosing a Schema for Search
Model titles, body text, filters, tags, and helper fields so search behavior stays predictable.
OverviewComparing 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.
API ReferencecosineSimilarity
Computes cosine similarity for two equal-length vectors.
API ReferenceCpuVectorScorer
Default CPU scorer that uses normalized float32 vectors and dot-product scoring.
API ReferencecreateSeededRandom
Creates a deterministic pseudo-random number generator from a numeric seed.
API ReferencecreateSimpleTextSearchIndex
Builds a ready-to-use lexical, suggest, and fuzzy search bundle from plain JSON documents.
API ReferenceCreateSimpleTextSearchIndexOptions
Options for building a beginner-friendly text search bundle.
AggregationsDate Histogram Aggregation
Bucket date fields into fixed-width time intervals for timelines and recency views.
API ReferenceDateFieldIndex
Structured date field index with range filters and date histograms.
API ReferenceDateFieldIndexState
Serialized state for DateFieldIndex.
API ReferenceDateHistogramBucket
Date histogram bucket.
API ReferencedecodeGeohash
Decodes a geohash to the center point of its bounding box.
API ReferencedecodeGeohashBounds
Decodes a geohash to its bounding box.
API ReferencedefaultBm25Config
Default BM25 configuration used by text indexes.
API ReferenceDisMaxQuery
Best-field query that keeps the strongest clause dominant with an optional tie breaker.
Lexical QueryingDisMaxQuery for Best-Field Matching with Tie Breakers
Prefer the strongest matching clause while still giving partial credit to secondary matches.
API ReferenceDisMaxQueryParams
Parameters for constructing a DisMaxQuery.
API ReferenceDistanceFeatureQuery
Numeric/date feature query that boosts values closest to an origin.
RankingDistanceFeatureQuery for Recency and Numeric Closeness
Boost documents by how close a numeric or date field is to an origin value.
API ReferenceDistanceFeatureQueryParams
Parameters for constructing a DistanceFeatureQuery.
API ReferenceDocument
Stored document shape used by DocumentIndex.
Other FeaturesDocument Chunking Strategies
Split long documents into meaningful sections so lexical retrieval, highlighting, and vector search stay focused.
OverviewDocumentation Index
A section-by-section map of the Querylight TS documentation.
API ReferenceDocumentIndex
Top-level document store that coordinates field indexes, search, highlighting, and serialization.
API ReferenceDocumentIndexState
Serialized state for a full DocumentIndex.
API ReferenceeastGeohash
Returns the neighboring geohash directly east of the provided hash.
API ReferenceEdgeNgramsTokenFilter
Produces edge n-grams from the start and end of each token.
API ReferenceElisionTextFilter
Removes apostrophes and elision markers.
API ReferenceencodeGeohash
Encodes a latitude/longitude coordinate into a geohash string.
API ReferenceExistsQuery
Filter that matches documents where a field has at least one stored value.
API ReferenceExistsQueryParams
Parameters for constructing an ExistsQuery.
API ReferenceFieldIndex
Common interface implemented by all field indexes.
GuidesFrom Raw API Payloads to Browser Dashboards
A practical pattern for turning raw API responses into local-first dashboard interactions with Querylight TS.
API ReferencegenerateRandomVector
Creates a random vector of the requested dimensionality.
Other FeaturesGeo Indexing with Points and Polygons
Store GeoJSON and query by point containment or polygon intersection.
API ReferenceGeoFieldIndex
GeoJSON field index backed by geohashes for point and polygon querying.
API ReferenceGeoFieldIndexState
Serialized state for GeoFieldIndex.
API ReferencegeohashContains
Returns `true` when a point falls inside the geohash cell.
API ReferencegeohashesForGeometry
Collects geohashes that cover or intersect the provided geometry.
API ReferenceGeometry
Supported geometry shapes for geo indexing and querying.
API ReferencegeometryContainsPoint
Returns `true` when a geometry contains the given latitude/longitude point.
API ReferencegeometryIntersectsGeohash
Returns `true` when a geometry intersects the provided geohash cell.
API ReferencegeometryIntersectsPolygon
Returns `true` when a geometry intersects the provided polygon.
API ReferenceGeoPointQuery
Geo query that matches documents containing a point.
API ReferenceGeoPointQueryParams
Parameters for constructing a GeoPointQuery.
API ReferenceGeoPolygonQuery
Geo query that matches documents intersecting a polygon.
API ReferenceGeoPolygonQueryParams
Parameters for constructing a GeoPolygonQuery.
OverviewGetting Started with Browser Search
Build a practical search box quickly with either the beginner helper or the equivalent manual setup.
API ReferencehashFunction
Hashes a vector against a list of random projection vectors.
API ReferenceHighlightClause
Highlight clause emitted by queries that support highlighting.
API ReferenceHighlightFieldResult
Highlight results for one field.
API ReferenceHighlightFragment
Highlight fragment returned for one stored field value.
API ReferenceHighlightFragmentPart
Plain or highlighted segment within a returned fragment.
Other FeaturesHighlighting with Querylight TS
Generate exact, phrase, prefix, and fuzzy highlight fragments after retrieval using stored source offsets.
API ReferenceHighlightRequest
Options for `DocumentIndex.highlight(...)`.
API ReferenceHighlightResult
Highlight response payload.
API ReferenceHighlightSpan
Highlighted span within a stored field value.
AggregationsHistogram Aggregation
Bucket numeric fields into regular fixed-width intervals for charts and sidebar facets.
API ReferenceHit
`[documentId, score]` tuple returned by search operations.
API ReferenceHits
Ordered list of scored hits.
Demo InternalsHow the Aggregations Sidebar Works
How the demo calculates live text facets, word-count buckets, and significant terms for the right-hand sidebar.
GuidesHow To Build Autocomplete
Use prefix-friendly fields, compact suggestion text, and stable ranking for search-as-you-type.
GuidesHow To Build Faceted Navigation
Use text, numeric, and date aggregations over the current hit set to drive filters, counts, and exploratory navigation.
API Referenceids
Extracts document ids from an ordered hit list.
API ReferenceIndexState
Union of all serialized field index state payloads.
API ReferenceIndexStateBase
Common base type for serialized field index state.
API ReferenceInterpunctionTextFilter
Replaces punctuation with spaces before tokenization.
OverviewIntroducing Querylight TS
Why this TypeScript port exists, who it is for, and where it fits relative to established search tools.
API ReferenceKeywordTokenizer
Tokenizer that keeps the full input as a single token.
Demo InternalsLazy Indexing in the Dashboard Demo
How the dashboard route delays index construction until a section is actually viewed.
API ReferenceLowerCaseTextFilter
Lowercases input text before tokenization.
API ReferenceMatchAll
Query that matches every indexed document.
API ReferenceMatchAllParams
Parameters for constructing a MatchAll.
API ReferenceMatchPhrase
Phrase query with optional slop.
API ReferenceMatchPhraseParams
Parameters for constructing a MatchPhrase.
API ReferenceMatchQuery
Full-text query against one field using analyzed terms and optional prefix expansion.
API ReferenceMatchQueryParams
Parameters for constructing a MatchQuery.
AggregationsMax Aggregation
Get the largest indexed numeric or date value, optionally restricted to the current result set.
AggregationsMin Aggregation
Get the smallest indexed numeric or date value, optionally restricted to the current result set.
API ReferenceMultiMatchQuery
Full-text query that allows analyzed terms to match across multiple fields.
API ReferenceMultiMatchQueryParams
Parameters for constructing a MultiMatchQuery.
API ReferenceMultiPolygonCoordinates
Multi-polygon coordinates in GeoJSON-compatible form.
API ReferenceNgramTokenFilter
Produces character n-grams from token streams.
API ReferencenormalizedBoost
Resolves `undefined` boosts to a neutral multiplier of `1.0`.
API ReferencenormalizeVector
Returns a unit-length copy of the provided vector.
API ReferencenorthGeohash
Returns the neighboring geohash directly north of the provided hash.
API ReferenceNumericFieldIndex
Structured numeric field index with range filters and numeric aggregations.
IndexingNumericFieldIndex and DateFieldIndex for Structured Features
Map numeric and date fields explicitly so range queries, ranking features, and aggregations behave predictably.
API ReferenceNumericFieldIndexState
Serialized state for NumericFieldIndex.
API ReferenceNumericHistogramBucket
Numeric histogram bucket.
API ReferenceNumericRangeAggregationBucket
Materialized numeric range aggregation bucket.
API ReferenceNumericRangeAggregationRange
One configured bucket in a numeric range aggregation.
API ReferenceNumericStatsAggregation
Aggregate statistics over numeric values.
API ReferenceOP
Boolean operator used by text queries that combine multiple analyzed terms.
API ReferenceorHits
Unions two hit lists and sums scores for duplicate documents.
OverviewOther Work Related to Querylight TS
A map of adjacent projects by Jilles van Gurp around search, ranking, Elasticsearch, geo, and DSL tooling.
OperationsPerformance and Memory Tuning
Control index size and query cost by choosing fields, analyzers, and precomputation strategies carefully.
Lexical QueryingPhrase Search and Slop
Match analyzed terms in sequence, with optional movement tolerance.
API ReferencePolygonCoordinates
Polygon coordinates in GeoJSON-compatible ring form.
API ReferencepopulateLSHBuckets
Populates LSH buckets for a single vector per id.
IndexingPortable JSON Index State
Serialize index structures and hydrate them again without reindexing.
API ReferencePrefixQuery
Prefix lookup query over trie-backed text fields.
API ReferencePrefixQueryParams
Parameters for constructing a PrefixQuery.
API ReferencePreparedVector
Prepared vector storage used by vector scorers.
API ReferenceQuery
Minimal query contract implemented by all query classes.
API ReferenceQueryContext
Mutable search context used to carry filter/include/exclude state across nested queries.
API ReferenceRandomSource
Zero-argument random-number source returning values in `[0, 1)`.
AggregationsRange Aggregation
Bucket numeric or date fields into explicit ranges for faceting and filtered navigation.
API ReferenceRangeQuery
Range query for lexical, numeric, or date fields.
Lexical QueryingRangeQuery Over Lexical Fields
Filter sortable string terms with gt, gte, lt, and lte boundaries.
API ReferenceRangeQueryParams
Parameters for constructing a RangeQuery.
API ReferenceRankFeatureLinearOptions
Linear rank feature scoring configuration.
API ReferenceRankFeatureLogOptions
Logarithmic rank feature scoring configuration.
API ReferenceRankFeatureOptions
Supported rank feature scoring modes.
API ReferenceRankFeatureQuery
Numeric feature query for saturation, log, sigmoid, or linear boosting.
RankingRankFeatureQuery for Numeric Relevance Signals
Boost documents with numeric features such as popularity, clicks, or quality scores.
API ReferenceRankFeatureQueryParams
Parameters for constructing a RankFeatureQuery.
API ReferenceRankFeatureSaturationOptions
Saturation-style rank feature scoring configuration.
API ReferenceRankFeatureSigmoidOptions
Sigmoid rank feature scoring configuration.
API ReferenceRankingAlgorithm
Built-in scoring algorithms for lexical ranking.
GuidesReal-World Recipes
Practical patterns for docs search, blog search, product filtering, related content, and lightweight semantic retrieval.
RankingReciprocal Rank Fusion
Combine multiple ranked result lists from lexical, filtered, geo, or vector search.
API ReferencereciprocalRankFusion
Combines multiple ranked lists using reciprocal rank fusion.
API ReferenceReciprocalRankFusionOptions
Tuning options for reciprocal rank fusion.
API ReferencerectangleToPolygon
Builds a rectangular polygon from min/max lon/lat bounds.
API ReferenceRegexpQuery
Regular-expression query over indexed terms.
Lexical QueryingRegexpQuery for Term-Level Regular Expressions
Match indexed terms with JavaScript regular expressions when wildcard patterns are not expressive enough.
API ReferenceRegexpQueryParams
Parameters for constructing a RegexpQuery.
RankingRelevance Tuning with BM25, TF-IDF, and RRF
Choose ranking strategies deliberately and combine lexical, field, feature, and scripted signals without losing control.
API ReferenceScriptExecutionContext
Runtime values exposed to ScriptQuery and ScriptScoreQuery callbacks.
API ReferenceScriptFilter
Predicate callback used by ScriptQuery.
API ReferenceScriptQuery
Custom JavaScript predicate query.
Lexical QueryingScriptQuery for Custom JavaScript Filters
Filter documents with a JavaScript function when built-in query classes do not express the rule cleanly.
API ReferenceScriptQueryParams
Parameters for constructing a ScriptQuery.
API ReferenceScriptScore
Scoring callback used by ScriptScoreQuery.
API ReferenceScriptScoreQuery
Query wrapper that replaces the base score with a custom script score.
RankingScriptScoreQuery for Custom JavaScript Scoring
Rescore matching documents with a JavaScript function that combines `_score` with your own business logic.
API ReferenceScriptScoreQueryParams
Parameters for constructing a ScriptScoreQuery.
OverviewSearch Engine Techniques for Analytics UIs
How search-style filtering and aggregation patterns translate naturally into exploratory analytics interfaces.
API ReferenceSearchRequest
Request object for paginated searching.
IndexingSerialization, Hydration, and Shipping Indexes
Prebuild index state, ship JSON to the client, and rehydrate fast without reindexing in the browser.
AggregationsSignificant Terms Aggregation
Surface terms that are unusually common in the current subset compared to the background corpus.
API ReferenceSignificantTermsBucket
Significant-terms bucket comparing subset and background frequency.
API ReferenceSimpleStringTrie
Simple trie implementation for prefix lookup and completion.
API ReferencesimpleTextSearch
Runs the default simple-text-search strategy against a bundle created by createSimpleTextSearchIndex.
Other FeaturesSimpleTextSearch for Plain JSON Documents
A beginner path that builds a usable index from plain objects and runs a good-enough default search.
API ReferenceSimpleTextSearchIndex
Bundle returned by createSimpleTextSearchIndex.
API ReferenceSimpleTextSearchRequest
Request object for simpleTextSearch.
GuidesSlicing and Dicing Open Data with Querylight TS
Use small open-data snapshots to prototype interactive analytics in the browser with Querylight TS.
API ReferenceSplittingTokenizer
Whitespace tokenizer for ordinary text analysis.
AggregationsStats Aggregation
Get count, min, max, sum, and average from a numeric or date field in one call.
AggregationsSum Aggregation
Add up all indexed numeric or date values in a field, optionally within a filtered subset.
Lexical QueryingTerm, Terms, Prefix, Exists, and Match Queries
Use exact term lookups, field existence checks, prefix lookup, or analyzed text matching.
API ReferenceTermPos
Recorded token position for one document occurrence.
API ReferenceTermQuery
Exact term-level query against a single text field.
API ReferenceTermQueryParams
Parameters for constructing a TermQuery.
AggregationsTerms Aggregation
Build document-count facets from text fields over the full corpus or the current hit set.
API ReferenceTermsQuery
Any-of exact term query against a single text field.
API ReferenceTermsQueryParams
Parameters for constructing a TermsQuery.
OperationsTesting Search Behavior
Write tests around ranking, filtering, edge cases, and representative user queries instead of only API smoke tests.
API ReferenceTextFieldIndex
Lexical field index with analyzers, ranking, phrase matching, prefix lookup, and aggregations.
API ReferenceTextFieldIndexState
Serialized state for TextFieldIndex.
API ReferenceTextFilter
Text preprocessor applied before tokenization.
RankingTF-IDF and BM25 Ranking
Choose between classic term weighting and Lucene-style BM25 scoring.
API ReferenceTokenFilter
Token postprocessor applied after tokenization.
API ReferenceTokenizer
Tokenizer that turns raw text into token strings.
IndexingTrie-Backed Prefix Expansion
Querylight keeps indexed text terms in a trie so prefix queries can expand to real terms already present in the field vocabulary.
API ReferenceTrieNode
Mutable trie node used by SimpleStringTrie.
API ReferenceTrieNodeState
Serialized trie node state.
GuidesUsing Querylight TS as a Local Analytics Engine
How to use Querylight TS filtering and aggregation primitives for browser-side analytics over plain JSON records.
AggregationsValue Count Aggregation
Count how many numeric or date values are indexed, optionally within the current result set.
API ReferenceVector
Dense numeric vector used for ANN indexing and reranking.
Other FeaturesVector Rescoring for Faster Hybrid Search
Rescore only the top lexical candidates with vectors when full vector retrieval would be too broad or too slow.
API ReferenceVectorFieldIndex
Locality-sensitive hash based vector index for approximate nearest-neighbor retrieval.
API ReferenceVectorFieldIndexOptions
Tuning options for locality-sensitive hashing in VectorFieldIndex.
API ReferenceVectorFieldIndexParams
Value-object constructor params for VectorFieldIndex.
API ReferenceVectorFieldIndexState
Serialized state for VectorFieldIndex.
API ReferenceVectorRescoreOptions
Tuning knobs for VectorRescoreQuery.
API ReferenceVectorRescoreQuery
Hybrid query that reranks the top lexical window with vector similarity.
API ReferenceVectorRescoreQueryParams
Parameters for constructing a VectorRescoreQuery.
API ReferenceVectorScorer
Scores a query vector against one or more prepared candidate vectors.
OverviewWhat 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.
OverviewWhat Querylight TS Covers
A compact browser and Node.js search toolkit for structured, explainable retrieval.
OverviewWhy Local-First Data Exploration Helps API Prototyping
Explore raw API payloads locally before committing to a larger backend analytics architecture.
API ReferenceWildcardQuery
Wildcard pattern query over indexed terms.
Lexical QueryingWildcardQuery for Term-Level Pattern Matching
Match indexed terms with `*` and `?` patterns without switching to full-text analysis.
API ReferenceWildcardQueryParams
Parameters for constructing a WildcardQuery.