Skip to content

hyper63/hyper-adapter-minisearch

Repository files navigation

hyper-adapter-minisearch

A Search port adapter that uses minisearch in the hyper service framework

Nest Badge Test Current Version


Background

Minisearch is a tiny but powerful in-memory fulltext search engine written in JavaScript. It is respectful of resources, and it can comfortably run both in Node and in the browser.

Getting Started

import { default as minisearch } from 'https://x.nest.land/[email protected]/mod.js'

export default {
  app,
  adapter: [
    {
      port: 'search',
      plugins: [minisearch({ dir: '/tmp' })],
    },
  ],
}

Installation

This is a Deno module available to import from nest.land

deps.js

export { default as minisearch } from 'https://x.nest.land/[email protected]/mod.js'

Features

  • create an index in Minisearch
  • delete an index in Minisearch
  • index a document using Minisearch
  • retrieving an indexed document from Minisearch index
  • update an indexed document in Minisearch index
  • remove an indexed document from Minisearch index
  • bulk operation to index multiple docs using Minisearch
  • query an Minisearch index

Methods

This adapter fully implements the Search port and can be used as the hyper Search service adapter

See the full port here

Contributing

Contributions are welcome! See the hyper contribution guide

Testing

./scripts/test.sh

To lint, check formatting, and run unit tests

License

Apache-2.0