meilisearch ~master

An API for MeiliSearch, a lightweight and fast search engine alternative to elasticsearch.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

A MeiliSearch API for D

MeiliSearch is a lightweight and fast search engine with a RESTfull search API. It's a modern alternative to elasticsearch and co.

Usage

Downalod and run MeiliSearch in your command-line with ./meilisearch --master-key YOUR_KEY_HERE

Note: this API used requests for handling HTTP request and so all responses are of type Response.

import std.stdio;
import meilisearch;
import requests: Response;

void main()
{
	// Use your own host and master key
	// See https://docs.meilisearch.com/guides/advanced_guides/authentication.html#api-key
	auto client = new Client("http://127.0.0.1:7700", "YOUR_KEY_HERE");
	auto index = client.createIndex("users");

	Response r = index.health();
	writeln("code ", r.code);
	writeln("body ", r.responseBody);

	Response r2 = index.addDocuments(`[{"id":"1", "name":"Car"}, {"id":"2", "name":"Bike"}]`);
	writeln("code ", r2.code);
	writeln("body ", r2.responseBody);


	Response r3 = index.search(`Car`);
	writeln("code ", r3.code);
	writeln("body ", r3.responseBody);
}
Authors:
  • Lawrence Aberba
Dependencies:
painlessjson, requests
Versions:
0.0.4 2020-Dec-28
0.0.3 2020-Dec-18
0.0.2 2020-Dec-18
0.0.1 2020-Dec-18
~master 2020-Dec-28
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 10 downloads total

Score:
0.6
Short URL:
meilisearch.dub.pm