Skip to content

Commit

Permalink
fix for meilisearch#577
Browse files Browse the repository at this point in the history
  • Loading branch information
danFbach committed Nov 11, 2024
1 parent 7010b39 commit 83c0506
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
18 changes: 18 additions & 0 deletions src/Meilisearch/ISearchable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ public interface ISearchable<T>
[JsonPropertyName("hits")]
IReadOnlyCollection<T> Hits { get; }

/// <summary>
/// Number of documents skipped.
/// </summary>
[JsonPropertyName("offset")]
int Offset { get; }

/// <summary>
/// Number of documents to take.
/// </summary>
[JsonPropertyName("limit")]
int Limit { get; }

/// <summary>
/// Gets the estimated total number of hits returned by the search.
/// </summary>
[JsonPropertyName("estimatedTotalHits")]
int EstimatedTotalHits { get; }

/// <summary>
/// Returns the number of documents matching the current search query for each given facet.
/// </summary>
Expand Down
12 changes: 3 additions & 9 deletions src/Meilisearch/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,15 @@ public SearchResult(IReadOnlyCollection<T> hits, int offset, int limit, int esti
[JsonPropertyName("hits")]
public IReadOnlyCollection<T> Hits { get; }

/// <summary>
/// Number of documents skipped.
/// </summary>
/// <inheritdoc/>
[JsonPropertyName("offset")]
public int Offset { get; }

/// <summary>
/// Number of documents to take.
/// </summary>
/// <inheritdoc/>
[JsonPropertyName("limit")]
public int Limit { get; }

/// <summary>
/// Gets the estimated total number of hits returned by the search.
/// </summary>
/// <inheritdoc/>
[JsonPropertyName("estimatedTotalHits")]
public int EstimatedTotalHits { get; }

Expand Down

0 comments on commit 83c0506

Please sign in to comment.