From c7216ed36dbbac5e38753a0660fa622210b5d4bd Mon Sep 17 00:00:00 2001 From: postmeback Date: Sat, 26 Oct 2024 21:24:04 +0530 Subject: [PATCH] Initial Commit --- src/Meilisearch/MeilisearchClient.cs | 8 +++++ src/Meilisearch/SearchSimilarDocuments.cs | 37 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/Meilisearch/SearchSimilarDocuments.cs diff --git a/src/Meilisearch/MeilisearchClient.cs b/src/Meilisearch/MeilisearchClient.cs index 19fd7b03..8a82f535 100644 --- a/src/Meilisearch/MeilisearchClient.cs +++ b/src/Meilisearch/MeilisearchClient.cs @@ -396,6 +396,14 @@ public async Task SwapIndexesAsync(List indexes, Cancellati return await response.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// + public async Task SearchSimilarDocuments(SearchSimilarDocuments searchSimilarDocuments) + { + throw NotImplementedException(); + } + /// /// Generate a tenant token string to be used during search. /// diff --git a/src/Meilisearch/SearchSimilarDocuments.cs b/src/Meilisearch/SearchSimilarDocuments.cs new file mode 100644 index 00000000..b5478578 --- /dev/null +++ b/src/Meilisearch/SearchSimilarDocuments.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; + +namespace Meilisearch +{ + public class SearchSimilarDocuments + { + + public int Id { get; set; } + + [DefaultValue("default")] + public string Embedder { get; set; } + + public string[] AttributesToRetrieve { get; set; } + + [DefaultValue(0)] + public int Offset { get; set; } + + [DefaultValue(20)] + public int Limit { get; set; } + + public string Filter { get; set; } + + [DefaultValue(false)] + public bool ShowRankingScore { get; set; } + + [DefaultValue(false)] + public bool ShowRankingScoreDetails { get; set; } + + public int RankingScoreThreshold { get; set; } + + [DefaultValue(false)] + public bool RetrieveVectors { get; set; } + } +}