Public
Edited
Apr 28, 2023
Insert cell
Insert cell
lyra = import( "https://unpkg.com/@lyrasearch/lyra@latest/dist/index.js");
Insert cell
db = {

const the_db = lyra.create({
schema: {
id: 'string', // _id
adult: 'boolean',
backdrop_path: 'string',
belongs_to_collection: 'string',
budget: 'number',
genres: [{ id: 'number', name: 'string', }],
homepage: 'string',
// id: 'number',
// id: 'string',
imdb_id: 'string',
original_language: 'string',
original_title: 'string',
overview: 'string',
popularity: 'number',
poster_path: 'string',
production_companies: [{ id: 'number', logo_path: 'string', name: 'string', origin_country: 'string',}],
production_countries: [{ iso_3166_1: 'string', name: 'string', }],
release_date: 'string',
revenue: 'number',
runtime: 'number',
spoken_languages: [{ english_name: 'string', iso_639_1: 'string', name: 'string', }],
status: 'string',
tagline:'string',
title: 'string',
video: 'boolean',
vote_average: 'number',
vote_count: 'number',
_createdOn: 'string',
},
});

await lyra.insertBatch(the_db,bMovies)
return the_db
}
Insert cell
viewof what = Inputs.text({label: "Search", value:'cat'})
Insert cell
searchResult = lyra.search(db, {
term: what,
properties: '*',
tolerance: 1,
});
Insert cell
bMovies = FileAttachment("b-movies.json").json()
Insert cell
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