Skip to content

DanieleFedeli/lyra-advanced-query-plugin

Repository files navigation

codecov Test CI Lint CI

Lyra's advanced query plugin

This package is a plugin (experimental) for Lyra that aims to enhance lyra retrieval possibility.

Usage

Initialize Lyra

import lyra from '@lyrasearch/lyra';
import {
  advancedSearch,
  afterInstertAdvancedQuery,
} from 'lyra-advanced-query-plugin';

const db = await lyra.create({
  schema: {
    author: 'string',
    alive: 'boolean',
    age: 'number',
  },
  hooks: {
    afterInsert: afterInstertAdvancedQuery,
  },
});

await insertWithHooks(lyrs, {
  alive: false,
  author: 'Daniele Fedeli',
  age: 25,
});

const result = await advancedSearch(lyra, {
  where: { alive: true, age: { '=': 25 } },
  term: 'Daniele',
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published