Reference Entry
API Reference
API Reference · foundation · order 1
Generated symbol-level API documentation for the published Querylight TS surface.
Relevant APIs
API Reference
Generated symbol-level documentation for the published @tryformation/querylight-ts API surface.
Use this section for constructor signatures, interfaces, type aliases, and exported utility functions. Use the rest of the docs for guides and behavior-focused articles.
Classes
- Analyzer: Configurable analyzer pipeline used by text indexes and query parsing.
- BoolQuery: Boolean composition query with Elasticsearch-style should/must/filter/mustNot semantics.
- BoostingQuery: Query wrapper that softly demotes hits matching a negative clause.
- CpuVectorScorer: Default CPU scorer that uses normalized float32 vectors and dot-product scoring.
- DateFieldIndex: Structured date field index with range filters and date histograms.
- DisMaxQuery: Best-field query that keeps the strongest clause dominant with an optional tie breaker.
- DistanceFeatureQuery: Numeric/date feature query that boosts values closest to an origin.
- DocumentIndex: Top-level document store that coordinates field indexes, search, highlighting, and serialization.
- EdgeNgramsTokenFilter: Produces edge n-grams from the start and end of each token.
- ElisionTextFilter: Removes apostrophes and elision markers.
- ExistsQuery: Filter that matches documents where a field has at least one stored value.
- GeoFieldIndex: GeoJSON field index backed by geohashes for point and polygon querying.
- GeoPointQuery: Geo query that matches documents containing a point.
- GeoPolygonQuery: Geo query that matches documents intersecting a polygon.
- InterpunctionTextFilter: Replaces punctuation with spaces before tokenization.
- KeywordTokenizer: Tokenizer that keeps the full input as a single token.
- LowerCaseTextFilter: Lowercases input text before tokenization.
- MatchAll: Query that matches every indexed document.
- MatchPhrase: Phrase query with optional slop.
- MatchQuery: Full-text query against one field using analyzed terms and optional prefix expansion.
- MultiMatchQuery: Full-text query that allows analyzed terms to match across multiple fields.
- NgramTokenFilter: Produces character n-grams from token streams.
- NumericFieldIndex: Structured numeric field index with range filters and numeric aggregations.
- PrefixQuery: Prefix lookup query over trie-backed text fields.
- QueryContext: Mutable search context used to carry filter/include/exclude state across nested queries.
- RangeQuery: Range query for lexical, numeric, or date fields.
- RankFeatureQuery: Numeric feature query for saturation, log, sigmoid, or linear boosting.
- RegexpQuery: Regular-expression query over indexed terms.
- ScriptQuery: Custom JavaScript predicate query.
- ScriptScoreQuery: Query wrapper that replaces the base score with a custom script score.
- SimpleStringTrie: Simple trie implementation for prefix lookup and completion.
- SplittingTokenizer: Whitespace tokenizer for ordinary text analysis.
- TermQuery: Exact term-level query against a single text field.
- TermsQuery: Any-of exact term query against a single text field.
- TextFieldIndex: Lexical field index with analyzers, ranking, phrase matching, prefix lookup, and aggregations.
- TrieNode: Mutable trie node used by SimpleStringTrie.
- VectorFieldIndex: Locality-sensitive hash based vector index for approximate nearest-neighbor retrieval.
- VectorRescoreQuery: Hybrid query that reranks the top lexical window with vector similarity.
- WildcardQuery: Wildcard pattern query over indexed terms.
Functions
- andHits: Reference for andHits.
- applyBoost: Reference for applyBoost.
- bigramVector: Reference for bigramVector.
- cosineSimilarity: Reference for cosineSimilarity.
- createSeededRandom: Reference for createSeededRandom.
- createSimpleTextSearchIndex: Reference for createSimpleTextSearchIndex.
- decodeGeohash: Reference for decodeGeohash.
- decodeGeohashBounds: Reference for decodeGeohashBounds.
- defaultBm25Config: Reference for defaultBm25Config.
- eastGeohash: Reference for eastGeohash.
- encodeGeohash: Reference for encodeGeohash.
- generateRandomVector: Reference for generateRandomVector.
- geohashContains: Reference for geohashContains.
- geohashesForGeometry: Reference for geohashesForGeometry.
- geometryContainsPoint: Reference for geometryContainsPoint.
- geometryIntersectsGeohash: Reference for geometryIntersectsGeohash.
- geometryIntersectsPolygon: Reference for geometryIntersectsPolygon.
- hashFunction: Reference for hashFunction.
- ids: Reference for ids.
- normalizedBoost: Reference for normalizedBoost.
- normalizeVector: Reference for normalizeVector.
- northGeohash: Reference for northGeohash.
- orHits: Reference for orHits.
- populateLSHBuckets: Reference for populateLSHBuckets.
- reciprocalRankFusion: Reference for reciprocalRankFusion.
- rectangleToPolygon: Reference for rectangleToPolygon.
- simpleTextSearch: Reference for simpleTextSearch.
Interfaces
- AnalyzedToken: Token with original source offsets for highlighting and phrase work.
- AsyncVectorScorer: Optional async scoring extension for backends such as WebGPU.
- Bm25Config: BM25 scoring configuration.
- BoolQueryParams: Parameters for constructing a BoolQuery.
- BoostingQueryParams: Parameters for constructing a BoostingQuery.
- CreateSimpleTextSearchIndexOptions: Options for building a beginner-friendly text search bundle.
- DateFieldIndexState: Serialized state for DateFieldIndex.
- DateHistogramBucket: Date histogram bucket.
- DisMaxQueryParams: Parameters for constructing a DisMaxQuery.
- DistanceFeatureQueryParams: Parameters for constructing a DistanceFeatureQuery.
- Document: Stored document shape used by DocumentIndex.
- DocumentIndexState: Serialized state for a full DocumentIndex.
- ExistsQueryParams: Parameters for constructing an ExistsQuery.
- FieldIndex: Common interface implemented by all field indexes.
- GeoFieldIndexState: Serialized state for GeoFieldIndex.
- GeoPointQueryParams: Parameters for constructing a GeoPointQuery.
- GeoPolygonQueryParams: Parameters for constructing a GeoPolygonQuery.
- HighlightClause: Highlight clause emitted by queries that support highlighting.
- HighlightFieldResult: Highlight results for one field.
- HighlightFragment: Highlight fragment returned for one stored field value.
- HighlightFragmentPart: Plain or highlighted segment within a returned fragment.
- HighlightRequest: Options for
DocumentIndex.highlight(...). - HighlightResult: Highlight response payload.
- HighlightSpan: Highlighted span within a stored field value.
- IndexStateBase: Common base type for serialized field index state.
- MatchAllParams: Parameters for constructing a MatchAll.
- MatchPhraseParams: Parameters for constructing a MatchPhrase.
- MatchQueryParams: Parameters for constructing a MatchQuery.
- MultiMatchQueryParams: Parameters for constructing a MultiMatchQuery.
- NumericFieldIndexState: Serialized state for NumericFieldIndex.
- NumericHistogramBucket: Numeric histogram bucket.
- NumericRangeAggregationBucket: Materialized numeric range aggregation bucket.
- NumericRangeAggregationRange: One configured bucket in a numeric range aggregation.
- NumericStatsAggregation: Aggregate statistics over numeric values.
- PrefixQueryParams: Parameters for constructing a PrefixQuery.
- Query: Minimal query contract implemented by all query classes.
- RangeQueryParams: Parameters for constructing a RangeQuery.
- RankFeatureLinearOptions: Linear rank feature scoring configuration.
- RankFeatureLogOptions: Logarithmic rank feature scoring configuration.
- RankFeatureQueryParams: Parameters for constructing a RankFeatureQuery.
- RankFeatureSaturationOptions: Saturation-style rank feature scoring configuration.
- RankFeatureSigmoidOptions: Sigmoid rank feature scoring configuration.
- ReciprocalRankFusionOptions: Tuning options for reciprocal rank fusion.
- RegexpQueryParams: Parameters for constructing a RegexpQuery.
- ScriptExecutionContext: Runtime values exposed to ScriptQuery and ScriptScoreQuery callbacks.
- ScriptQueryParams: Parameters for constructing a ScriptQuery.
- ScriptScoreQueryParams: Parameters for constructing a ScriptScoreQuery.
- SearchRequest: Request object for paginated searching.
- SignificantTermsBucket: Significant-terms bucket comparing subset and background frequency.
- SimpleTextSearchIndex: Bundle returned by createSimpleTextSearchIndex.
- SimpleTextSearchRequest: Request object for simpleTextSearch.
- TermPos: Recorded token position for one document occurrence.
- TermQueryParams: Parameters for constructing a TermQuery.
- TermsQueryParams: Parameters for constructing a TermsQuery.
- TextFieldIndexState: Serialized state for TextFieldIndex.
- TextFilter: Text preprocessor applied before tokenization.
- TokenFilter: Token postprocessor applied after tokenization.
- Tokenizer: Tokenizer that turns raw text into token strings.
- TrieNodeState: Serialized trie node state.
- VectorFieldIndexOptions: Tuning options for locality-sensitive hashing in VectorFieldIndex.
- VectorFieldIndexParams: Value-object constructor params for VectorFieldIndex.
- VectorFieldIndexState: Serialized state for VectorFieldIndex.
- VectorRescoreOptions: Tuning knobs for VectorRescoreQuery.
- VectorRescoreQueryParams: Parameters for constructing a VectorRescoreQuery.
- VectorScorer: Scores a query vector against one or more prepared candidate vectors.
- WildcardQueryParams: Parameters for constructing a WildcardQuery.
Type Aliases
- Geometry: Supported geometry shapes for geo indexing and querying.
- Hit:
[documentId, score]tuple returned by search operations. - Hits: Ordered list of scored hits.
- IndexState: Union of all serialized field index state payloads.
- MultiPolygonCoordinates: Multi-polygon coordinates in GeoJSON-compatible form.
- PolygonCoordinates: Polygon coordinates in GeoJSON-compatible ring form.
- PreparedVector: Prepared vector storage used by vector scorers.
- RandomSource: Zero-argument random-number source returning values in
[0, 1). - RankFeatureOptions: Supported rank feature scoring modes.
- ScriptFilter: Predicate callback used by ScriptQuery.
- ScriptScore: Scoring callback used by ScriptScoreQuery.
- Vector: Dense numeric vector used for ANN indexing and reranking.
Enumerations
- OP: Boolean operator used by text queries that combine multiple analyzed terms.
- RankingAlgorithm: Built-in scoring algorithms for lexical ranking.