Skip to content

Plug and play full-text search for your Adonis application (Meilisearch, Algolia, Typesense)

License

Notifications You must be signed in to change notification settings

simoneNEMO/magnify

 
 

Repository files navigation


@foadonis/magnify

Plug and play full-text search for your Adonis application


PRs Welcome License @foadonis/magnify

Description

Magnify provides a simple, driver based solution for adding full-text search to your Lucid models. Using Lucid hooks, Magnify automatically keep your search indexes in sync with your database.

Currently, Magnify ships with Algolia, Meilisearch and Typesense engines. Furthermore, writing custom engines is simple and you are free to extend Magnify with your own search implementations.

// title: app/models/post.ts
import { compose } from '@adonisjs/core/helpers'
import { BaseModel, column } from '@adonisjs/lucid/orm'
import { Searchable } from '@foadonis/magnify'

export default class Post extends compose(BaseModel, Searchable) {
  @column({ isPrimary: true })
  declare id: string

  @column()
  declare title: string
}
import Post from '#models/post'

const posts = await Post.search('Adonis').take(10).get()

Quickstart

Installation & Getting Started

License

MIT licensed.

About

Plug and play full-text search for your Adonis application (Meilisearch, Algolia, Typesense)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.1%
  • JavaScript 0.9%