Skip to content

Commit a8c6ac0

Browse files
adds missing field FacetReturnParent and Parent in FacetCountHit (#235) (#236)
1 parent 0e6621c commit a8c6ac0

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/Typesense/SearchParameters.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ public record SearchParameters
244244
[JsonPropertyName("facet_query_num_typos")]
245245
public int? FacetQueryNumberTypos { get; set; }
246246

247+
[JsonPropertyName("facet_return_parent")]
248+
public string? FacetReturnParent { get; set; }
249+
247250
// ---------------------------------------------------------------------------------------
248251
// Results parameters - https://typesense.org/docs/latest/api/search.html#results-parameters
249252
// ---------------------------------------------------------------------------------------

src/Typesense/SearchResult.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ public record FacetCountHit
134134
[JsonPropertyName("value")]
135135
public string Value { get; init; }
136136

137-
public FacetCountHit(string value, int count, string highlighted)
137+
[JsonPropertyName("parent")]
138+
public Dictionary<string, dynamic>? Parent { get; init; }
139+
140+
public FacetCountHit(string value, int count, string highlighted, Dictionary<string, dynamic>? parent = null)
138141
{
139142
Value = value;
140143
Count = count;
141144
Highlighted = highlighted;
145+
Parent = parent;
142146
}
143147
}
144148

0 commit comments

Comments
 (0)