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
Website | Benchmark | Demo | Repository for SeekStorm Python client | Repository for SeekStorm library, server, Rust client | Roadmap | Blog | X
SeekStorm.Clienttargetsnet8.0- Uses
HttpClient+System.Text.Json - Supports sync and async methods for all Python client endpoints
GET /api/v1/livePOST/DELETE/GET /api/v1/apikeyPOST /api/v1/indexGET/DELETE/PATCH /api/v1/index/{index_id}DELETE /api/v1/index/{index_id}/doc(clear with bodyclear)POST/PATCH/DELETE /api/v1/index/{index_id}/docGET /api/v1/index/{index_id}/doc/{doc_id}POST /api/v1/index/{index_id}/iteratorPOST /api/v1/index/{index_id}/queryPOST /api/v1/index/{index_id}/fileGET /api/v1/index/{index_id}/file/{doc_id}
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}");