Published
Edited
Jul 27, 2021
8 stars
Insert cell
Insert cell
Insert cell
typesense = import("https://cdn.skypack.dev/typesense@0.14?min")
Insert cell
Insert cell
client = new typesense.Client({
nodes: [
{
host: "qtg5aekc2iosjh93p.a1.typesense.net",
port: "443",
protocol: "https"
}
],
apiKey: "8hLCPSQTYcBuK29zY5q6Xhin7ONxHy99"
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
results = client
.collections("r")
.documents()
.search({ q, query_by: "title", facet_by: "ingredient_names" })
Insert cell
textresults = client
.collections("r")
.documents()
.search({
q,
query_by: "title",
...(facet.length && {
filter_by: `ingredient_names:=${JSON.stringify(facet)}`
}),
per_page: 250
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more