As a workaround, I did this and it appears to work. Not sure if there are any better solutions?
var response = _elasticClient.SearchAsync<Category>(s => s
.Query(q => q
.Bool(b => b
.Must(
bs => bs.Term(p => p.Id, id),
bs => bs.Term(p => p.Field("_type").Value("category"))
)
)
)
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…