0.49.0 • Published 11 months ago
@dedel.alex/adonis5-meilisearch v0.49.0
Install MeiliSearch Provider in Adonis
Install dependency
npm i @dedel.alex/adonis5-meilisearchRun command
node ace configure @dedel.alex/adonis5-meilisearchConfigure MeiliSearch
# MeiliSearch HOST
MEILISEARCH_HOST=http://127.0.0.1:7700
# MeiliSearch API Key
MEILISEARCH_API_KEY="masterKey"
# MeiliSearch options
MEILISEARCH_OPTIONS=""Usage
Here is an example of how to use the MeiliSearch Provider:
import client from "@ioc:Adonis/Addons/MeiliSearch";
// Get index - where the documents are stored.
const index = client.index("movies");
const documents = [
{ id: 1, title: "Carol", genres: ["Romance", "Drama"] },
{ id: 2, title: "Wonder Woman", genres: ["Action", "Adventure"] },
{ id: 3, title: "Life of Pi", genres: ["Adventure", "Drama"] },
{
id: 4,
title: "Mad Max: Fury Road",
genres: ["Adventure", "Science Fiction"],
},
{ id: 5, title: "Moana", genres: ["Fantasy", "Action"] },
{ id: 6, title: "Philadelphia", genres: ["Drama"] },
];
const response = await index.addDocuments(documents);
console.log(response); // => { "uid": 0 }For more information about MeiliSearch, check the offical website
Github project
0.48.2
11 months ago
0.48.0
11 months ago
0.49.0
11 months ago
0.48.1
11 months ago
0.46.0
11 months ago
0.47.0
11 months ago
0.45.0
11 months ago
0.44.1
1 year ago
0.42.0
1 year ago
0.43.0
1 year ago
0.44.0
1 year ago
0.41.0
1 year ago
0.39.0
2 years ago
0.38.0
2 years ago
0.37.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago