Conversation
|
The SearchResult<T> games = await client.Index("...").SearchAsync<T>("");Which is now invalid since the addition of ISearchable. |
Yes please, thank you 😊 |
… supported since ISearchable<T>. added context for casting ISearchable<T> into usable result
|
okay, I've updated the code samples. I added casting to the docs - let me know if this is out of scope, but i think it is useful for dotnet devs, as it was not immediately apparent to me before reviewing the source here. |
|
If it's useful for dotnet dev, let's keep it. Thank you @danFbach 🙏 For more context: we do not have any .NET dev at meilisearch, so any .NET expertise is welcome! |
curquiza
left a comment
There was a problem hiding this comment.
LGTM ✅
@ahmednfwela if you have time to ensure you are ok with this good practice, it would be awesome 😊
|
Friendly reminder @ahmednfwela if you have time, otherwise I will merge next week 😊 |
|
Build succeeded: |
Pull Request
Related issue
Fixes #577, references #578
What does this PR do?
SearchResult<T> result = await index.SearchAsync(...);is actually invalid since an explicit cast is required fromISearchable<T>to the type of result.SearchResult<T>orPaginatedResult<T>in order to populate propertiesEstimatedTotalHitsorTotalHitsandTotalPagesrespectively.PR checklist
Please check if your PR fulfills the following requirements:
If you have any critiques or anything you want added to the docs for this purpose, let me know. Just hoping to clarify how transform the interface correctly.
Technically the proper type could be derive by one of two methods:
or
I prefer the latter, so that's how i changed the docs.