MeilisearchDotnet 0.0.7
See the version list below for details.
dotnet add package MeilisearchDotnet --version 0.0.7
NuGet\Install-Package MeilisearchDotnet -Version 0.0.7
<PackageReference Include="MeilisearchDotnet" Version="0.0.7" />
paket add MeilisearchDotnet --version 0.0.7
#r "nuget: MeilisearchDotnet, 0.0.7"
// Install MeilisearchDotnet as a Cake Addin #addin nuget:?package=MeilisearchDotnet&version=0.0.7 // Install MeilisearchDotnet as a Cake Tool #tool nuget:?package=MeilisearchDotnet&version=0.0.7
MeiliSearchDotnet is a client for MeiliSearch written in .NET standard 2.0. MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine. Both searching and indexing are highly customizable. Features such as typo-tolerance, filters, and synonyms are provided out-of-the-box.
Table of Contents
🔧 Installation
It's available as NuGet package :
dotnet add package MeilisearchDotnet --version 0.0.7
https://www.nuget.org/packages/MeilisearchDotnet
🏃♀️ Run MeiliSearch
There are many easy ways to download and run a MeiliSearch instance.
For example, if you use Docker:
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
NB: you can also download MeiliSearch from Homebrew or APT.
🎬 Getting started
Here is a quickstart how to add / update documents
using System.Collections.Generic;
using System.Threading.Tasks;
using MeilisearchDotnet;
namespace console
{
public class Doc
{
public int Key1 { get; set; }
public string Value { get; set; }
}
class Program
{
static async Task Main(string[] args)
{
Meilisearch ms = new Meilisearch("http://localhost:7700", "masterKey");
MeilisearchDotnet.Index index = await ms.CreateIndex(new MeilisearchDotnet.Types.IndexRequest
{
Uid = "kero",
PrimaryKey = "Key1"
});
MeilisearchDotnet.Types.EnqueuedUpdate ret = await index.AddDocuments<Doc>(new List<Doc>() {
new Doc { Key1 = 222, Value = "aaa" },
new Doc { Key1 = 333, Value = "bbb" }
});
await index.WaitForPendingUpdate(ret.UpdateId);
Doc doc = await index.GetDocument<Doc>("222");
// doc => { Key1 = 222, Value = "aaa" }
ret = await index.AddDocuments<Doc>(new List<Doc>() {
new Doc { Key1 = 444, Value = "aaa" },
new Doc { Key1 = 555, Value = "bbb" }
}, new MeilisearchDotnet.Types.AddDocumentParams
{
PrimaryKey = "Key1"
});
await index.WaitForPendingUpdate(ret.UpdateId);
ret = await index.UpdateDocuments(new List<Doc>() {
new Doc { Key1 = 222, Value = "tpayet" },
new Doc { Key1 = 444, Value = "tutu" }
});
await index.WaitForPendingUpdate(ret.UpdateId);
doc = await index.GetDocument<Doc>("222");
// doc => { Key1 = 222, Value = "tpayet" }
}
}
}
Search in index
// MeiliSearch is typo-tolerant:
MeilisearchDotnet.Types.SearchResponse<Doc> result = await index.Search<Doc>("tpyaet");
// result => {
// "Hits": [{"Key1": 222,"Value": "tpayet"}],
// "Offset": 0,
// "Limit": 20,
// "ProcessingTimeMs": 1,
// "Query": "tpyaet"
// }
⚙️ Development Workflow
If you want to contribute, this sections describes the steps to follow.
Tests
# Tests
docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics
dotnet restore
dotnet test
Release
MeiliSearch tools follow the Semantic Versioning Convention.
You must do a PR modifying the file meilisearch-dotnet.csproj
with the right version.<br>
<Version>x.x.x</Version>
🤖 Compatibility with MeiliSearch
This package works for MeiliSearch >=0.10.x
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNet.WebApi.Client (>= 5.2.7)
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 4.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.