https://github.com/mateonunez/orama-schema-resolver
Create your Lyra's schema following the official specification
https://github.com/mateonunez/orama-schema-resolver
database orama plugin resolver schema
Last synced: 9 months ago
JSON representation
Create your Lyra's schema following the official specification
- Host: GitHub
- URL: https://github.com/mateonunez/orama-schema-resolver
- Owner: mateonunez
- License: mit
- Created: 2022-10-16T14:20:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-06T02:08:20.000Z (over 1 year ago)
- Last Synced: 2025-09-23T09:51:48.641Z (9 months ago)
- Topics: database, orama, plugin, resolver, schema
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/lyra-schema-resolver
- Size: 2.16 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🪄 Orama schema resolver
Create your [Orama](https://github.com/oramasearch/orama) schema following the official specification.
[](https://github.com/mateonunez/orama-schema-resolver/actions/workflows/ci.yml)
## Installation
You can install the package using `npm`, `yarn` or `pnpm`:
```sh
npm i orama-schema-resolver
```
```sh
yarn add orama-schema-resolver
```
```sh
pnpm add orama-schema-resolver
```
## Usage
```js
import { create, insert, search } from '@oramasearch/orama';
import resolveSchema from 'orama-schema-resolver';
import * as fs from 'fs';
// You can parse data from any source, but we'll use a local file for this example
const data = JSON.parse(fs.readFileSync('./package.json').toString());
const schema = resolveSchema(data);
const db = create({ schema })
insert(db, data);
const results = search(db, {
term: 'orama'
});
console.log(results)
```
# License
[MIT](/LICENSE)