Skip to content

Repository files navigation

SeekStorm C# REST Client

Logo
C# REST client (sync and async), for the SeekStorm vector & lexical search server.

seekstorm_client_cs is open source licensed under the Apache License 2.0

SeekStorm REST client (C#)

NuGet version .NET License

SeekStorm REST client (Python)

PyPI GitHub Stars License

SeekStorm REST client (TypeScript)

GitHub Stars npm License

SeekStorm REST client (Rust)

Crates.io Downloads Documentation License Roadmap

SeekStorm multi-tenancy search server

Crates.io Downloads Docker REST API Documentation License Roadmap

SeekStorm in-process search library

Crates.io Downloads Documentation License Roadmap

Website | Benchmark | Demo | Repository for SeekStorm Python client | Repository for SeekStorm library, server, Rust client | Roadmap | Blog | X

Project

  • SeekStorm.Client targets net8.0
  • Uses HttpClient + System.Text.Json
  • Supports sync and async methods for all Python client endpoints

Covered Endpoints

  • GET /api/v1/live
  • POST/DELETE/GET /api/v1/apikey
  • POST /api/v1/index
  • GET/DELETE/PATCH /api/v1/index/{index_id}
  • DELETE /api/v1/index/{index_id}/doc (clear with body clear)
  • POST/PATCH/DELETE /api/v1/index/{index_id}/doc
  • GET /api/v1/index/{index_id}/doc/{doc_id}
  • POST /api/v1/index/{index_id}/iterator
  • POST /api/v1/index/{index_id}/query
  • POST /api/v1/index/{index_id}/file
  • GET /api/v1/index/{index_id}/file/{doc_id}

Quick Start

using SeekStorm.Client;

var client = new SeekStormClient(
    baseUrl: "http://localhost:8080",
    apiKeyBase64: "YOUR_APIKEY_BASE64"
);

var live = await client.LiveAsync();
Console.WriteLine(live.Message);

var createIndex = await client.CreateIndexAsync(new CreateIndexRequest
{
    IndexName = "demo",
    Schema = new List<Dictionary<string, object?>>
    {
        new()
        {
            ["field"] = "title",
            ["field_type"] = "Text",
            ["store"] = true,
            ["index_lexical"] = true
        }
    }
});

await client.IndexDocumentAsync(createIndex.IndexId, new Dictionary<string, object?>
{
    ["title"] = "hello seekstorm"
});

await client.CommitIndexAsync(createIndex.IndexId);

var result = await client.QueryIndexAsync(createIndex.IndexId, new SearchRequestObject
{
    QueryString = "hello",
    Length = 5
});

Console.WriteLine($"Total hits: {result.CountTotal}");

About

C# client for the SeekStorm vector & lexical search server

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages