Skip to content

Commit

Permalink
adds missing field FacetReturnParent and Parent in FacetCountHit (#235)…
Browse files Browse the repository at this point in the history
… (#236)
  • Loading branch information
adonistseriotis authored Aug 28, 2024
1 parent 0e6621c commit a8c6ac0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Typesense/SearchParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
// ---------------------------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion src/Typesense/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, dynamic>? Parent { get; init; }

public FacetCountHit(string value, int count, string highlighted, Dictionary<string, dynamic>? parent = null)
{
Value = value;
Count = count;
Highlighted = highlighted;
Parent = parent;
}
}

Expand Down

0 comments on commit a8c6ac0

Please sign in to comment.