Migrating from Nest to Elastic.Client.Elasticsearch QueryContainer not longer available

I’m rewriting our code for the new Elastic.Client.Elasticsearch and I’m trying to find some code examples how to do that.

here I'm letting an example of code to be converted, the main problem is that QueryContainer is not longer available

private QueryContainer ObtenerCondicionesSegmentacionUsuarioApariciones(IEnumerable filtros)
{
QueryContainer andQuery = null;
if (filtros != null && filtros.Count() != 0)
{
var groups = filtros.GroupBy(p => p.categoria);
foreach (var group in groups)
{
QueryContainer orQuery = null;
foreach (var filter in group)
orQuery |= new TermQuery
{
Field = Filtro.categoriaAsNombreCampoTablaApariciones(filter.categoria) + ".raw",
Value = filter.valor.ToUpper()
};
andQuery |= orQuery;
}
}
return andQuery;
}

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