Elastic.Clients.Elasticsearch - Query list of codes

Hello, good afternoon,

I am using Elastic.Clients.Elasticsearch, but I am unable to perform queries using a list of codes.

Here is how I did it:

var listaDeValores = new List<int> { 1, 2, 3, 4 };

var searchRequest = new SearchRequest
{
    Index = "meu_indice",
    Query = new TermsQuery<int>
    {
        Field = "field",  // Campo onde os valores estão armazenados
        Terms = listaDeValores  // Lista de valores a serem consultados
    }
};

However, Terms does not accept the list of values.