MeilisearchDotnet 0.0.8

dotnet add package MeilisearchDotnet --version 0.0.8
NuGet\Install-Package MeilisearchDotnet -Version 0.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MeilisearchDotnet" Version="0.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MeilisearchDotnet --version 0.0.8
#r "nuget: MeilisearchDotnet, 0.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MeilisearchDotnet as a Cake Addin
#addin nuget:?package=MeilisearchDotnet&version=0.0.8

// Install MeilisearchDotnet as a Cake Tool
#tool nuget:?package=MeilisearchDotnet&version=0.0.8

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.8

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");
            Index index = await ms.GetOrCreateIndex(new IndexRequest
            {
                Uid = "kero",
                PrimaryKey = "Key1"
            });

            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 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:
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.8 704 6/5/2020
0.0.7 440 6/4/2020
0.0.6-preview1 302 6/4/2020
0.0.5 775 6/3/2020
0.0.4 794 6/3/2020
0.0.3-a 624 6/2/2020
0.0.2-a 606 5/29/2020
0.0.1-a 634 5/22/2020