From a8c6ac07874b53755b01a53792d223667084c37f Mon Sep 17 00:00:00 2001 From: Adonis Tseriotis Date: Wed, 28 Aug 2024 19:26:11 +0300 Subject: [PATCH] adds missing field FacetReturnParent and Parent in FacetCountHit (#235) (#236) --- src/Typesense/SearchParameters.cs | 3 +++ src/Typesense/SearchResult.cs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Typesense/SearchParameters.cs b/src/Typesense/SearchParameters.cs index 78b5335..2c209f6 100644 --- a/src/Typesense/SearchParameters.cs +++ b/src/Typesense/SearchParameters.cs @@ -244,6 +244,9 @@ public record SearchParameters [JsonPropertyName("facet_query_num_typos")] public int? FacetQueryNumberTypos { get; set; } + [JsonPropertyName("facet_return_parent")] + public string? FacetReturnParent { get; set; } + // --------------------------------------------------------------------------------------- // Results parameters - https://typesense.org/docs/latest/api/search.html#results-parameters // --------------------------------------------------------------------------------------- diff --git a/src/Typesense/SearchResult.cs b/src/Typesense/SearchResult.cs index 88bb117..0a20016 100644 --- a/src/Typesense/SearchResult.cs +++ b/src/Typesense/SearchResult.cs @@ -134,11 +134,15 @@ public record FacetCountHit [JsonPropertyName("value")] public string Value { get; init; } - public FacetCountHit(string value, int count, string highlighted) + [JsonPropertyName("parent")] + public Dictionary? Parent { get; init; } + + public FacetCountHit(string value, int count, string highlighted, Dictionary? parent = null) { Value = value; Count = count; Highlighted = highlighted; + Parent = parent; } }