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
Cannot run knn query using elasticClient.RequestResponseSerializer #8012
Comments
Hi @giannik, You are right, KNN queries are not completeley implemented yet. I can not give you an exact ETA for that, as it currently does not have very high priority. Besides that, please note, that deserialization of requests is not officially supported (and might not work with some requests). The client usually only serializes requests and deserializes responses. Roundtripping is at best partially implemented 🙂 |
@flobernd thanks for the notice. |
@giannik This scenario is not directly supported by the client. If you have query payloads in JSON format, I would probably use the low level transport client to send raw requests (you could probably still deserialize the response to the corresponding CLR type). There is a chance that the KNN query deserialization might work after some code generation improvements I'm currently working on (earliest release in the end of Q1), but I can't promise anything. |
thank you @flobernd . |
@giannik There is a very short example in this migration guide document: https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/migration-guide.html#_workarounds_for_missing_features Deserializing back to the CLR response types is more complex and I currently don't have any read-to-use documentation for that. |
KNN queries are now fully supported in 8.13.x. |
@flobernd thank you very much. |
Im trying to run a knn query in version 8.9 of dotnet client by passing the following json string into elastic client serializer as below :
json query string
passing json query into stream and then _elasticClient?.RequestResponseSerializer
error on _elasticClient?.RequestResponseSerialize
error :
It seems that it does not have the serializers for the new query type.
It works for other elastic query types like multi match but not this new knn type.
I wish to keep using this generic way and not change my code based on query type.
if i run it using the static types it works
The text was updated successfully, but these errors were encountered: