NEST equivalent code for an ML infer query

Hi there,

any NEST library documentation on how to infer query in ML? For instance I want to do the below:

POST /_ml/trained_models/sentence-transformers__all-minilm-l12-v2/_infer
  "docs": {
    "text_field": "similar movies of resident evil"

How do you achieve the above in using NEST in .NET?

Hi, @virtualaidev.

That endpoint was added in ES v8.3, so the v7 NEST client will not support that endpoint. We have a new client, Elastic.Clients.Elasticsearch, for v8. However, it doesn't currently support the ML endpoints. A workaround would be to use the new v8 client but drop down to its Transport layer to send a raw JSON request.

To help the team prioritise support for missing endpoints in the v8 client, I recommend you open a feature request to log your requirement for any ML endpoints.

Hi @stevejgordon,

any reference for the sample?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.