-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# add ShowMatchesPosition in SearchQuery setting made search output error #428
Comments
Hi @jennyesoo, |
Thanks @alallema . |
This is not a bug actually, you are deserializing to I suggest deserializing to |
Thank you so much @ahmednfwela, you're absolutely right 🚀. Sorry I didn't read more carefully. |
Hi, @ahmednfwela @alallema , thank you for your response. When using I hope this conveys my intended message. |
@jennyesoo a similar situation is addressed here for _formatted |
Describe the bug
Using ShowMatchesPosition in a SearchQuery, the search output fails to match the structure.
To Reproduce
Steps to reproduce the behavior:
SearchQuery query = new SearchQuery { ShowMatchesPosition = true };
code is
ISearchable<IReadOnlyDictionary<string, string>> output = await _client.Index(_indexName).SearchAsync<IReadOnlyDictionary<string, string>>(input, query);
Error is
System.Text.Json.JsonException: 'The JSON value could not be converted to System.String. Path: $.hits[0]._matchesPosition | LineNumber: 0 | BytePositionInLine: 36568.'
Expected behavior
The SearchAsync can be used flexibly.
ISearchable<T> output = await _client.Index(_indexName).SearchAsync<T>(input, query);
Meilisearch version:
Melisearch - [v1.2.0-rc.3]
C# -
The text was updated successfully, but these errors were encountered: