← Back to docs
Feature gallery
Small, purpose-built demo corpora, each showcasing one part of
the engine end to end with real indexed pages and a real
@ktjn/searchable-powered search box -- not mocked.
Try individual features
Basic search
Rank real pages from a static index.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("desk");
Fuzzy matching
Compare a typo with fuzzy matching disabled and enabled.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("wirelss", {
fuzzy: true,
fuzzyWeight: 0.5,
});
Facet filtering
Narrow the product corpus with live category counts.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("product", {
facets: ["category"],
});
Synonym expansion
Show results that only appear through a synonym rule.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/synonyms/search-index/manifest.json",
});
const result = await client.search("sofa", {
synonyms: true,
synonymWeight: 0.5,
});
Pinned results
Promote a curated best bet above organic results.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("returns policy");
Internationalized search
Query one multilingual index through language partitions.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/i18n/search-index/manifest.json",
});
const result = await client.search("espresso", {
language: "en",
});
Result highlighting
Mark the matched spans in every stored field.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("headphones", {
highlight: true,
});
AND vs OR matching
Require every term, or accept any term, in one query.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("headphones keyboard", {
operator: "or",
});
Exact phrase
Quoted phrases need adjacent terms, in order.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("\"mechanical keyboard\"");
Prefix search
head* matches any analyzed term starting with head.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("head*");
One-query term boost
Re-rank a single search toward a term, no rebuild.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("wireless speaker", {
operator: "or",
boosts: {
terms: {
"speaker": 5,
},
},
});
Did you mean?
A two-edit typo still surfaces a near term with fuzzy on.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("wirelssz", {
fuzzy: true,
});
Browse before you type
Filter a facet-only panel with no query text at all.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const facets = await client.facetValues("category");
for (const value of facets.values) {
console.log(value.value, value.count);
}
Geo search
Search a purpose-built store corpus where every result has a distinct location. Centered near Stockholm, the nearest stores rank at visibly different distances; try "Use my location" and widen the radius if needed.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/locations/search-index/manifest.json",
});
const result = await client.search("pickup", {
filters: {
"location": { lat: 59.3293, lon: 18.0686, radiusKm: 1600 },
},
sortByDistance: true,
});
Exact-match filtering
Filter on a stored SKU field with no facet declared for it at all.
Read the guide
View source
import { SearchClient } from "@ktjn/searchable";
const client = new SearchClient({
indexUrl: "gallery/products/search-index/manifest.json",
});
const result = await client.search("product", {
filters: { "sku": "SKU-00001" },
});
Explore complete demos
-
Store locator
Distinct pickup locations demonstrating radius filters, distance reporting, nearest-first sorting, and a schematic result map.
-
Product catalog
64 synthetic products: terms and numeric range facets, boosts, a pinned best-bet, and a fuzzy toggle with weight tuning.
-
Synonym playground
Non-overlapping vocabulary docs demonstrating synonym expansion, with matched-via-synonym results visibly labeled.
-
Multi-language corpus
Articles in six languages: language partitioning, Snowball stemming, and German diacritic-sensitive matching (schon vs. schön).
-
Documentation search
Search the complete curated documentation set with the same static index and browser client.