05 / API DOCUMENTATION
One HTTP endpoint for lexical, vector, and faceted search.
Zero-dependency JSON over HTTP/2 or gRPC with deterministic schema validation and typo highlighting.
Hybrid search query
Combine misspelled keyword queries with dense embedding recall and strict stock filters in one round-trip.
import { LexiconClient } from "@lexicon/sdk";
const lexicon = new LexiconClient({
host: "https://eu-01.lexiconsearch.io",
apiKey: process.env.LEXICON_KEY,
});
const hits = await lexicon.index("catalog").search({
q: "wireles ergonomic keybord",
hybrid: { alpha: 0.65, vectorField: "embedding_768" },
typoTolerance: { maxEdits: 2, minWordLength: 4 },
filter: "in_stock = true AND price <= 240",
limit: 12,
}); Query parameter specification
| Parameter | Type | Default | Behavior |
|---|---|---|---|
| q | string | "" | User query text tokenized for BM25 and embedded when hybrid mode is active. |
| hybrid.alpha | float [0..1] | 0.50 | Weighting between lexical BM25 (0.0) and dense vector similarity (1.0). |
| typoTolerance.maxEdits | 0 | 1 | 2 | 2 | Maximum Damerau-Levenshtein edits allowed by the FST term matcher. |
| filter | expression | null | Boolean predicate evaluated on SIMD roaring bitmaps before top-K scoring. |
| rescoreTopK | integer | 100 | Number of quantized vector candidates re-ranked using full FP32 dot product. |