I have an class called Product, which can be available in 1 or more countries (but rarely all of them).
I want to include in my query something that makes the my search/query only return products that is sold in that country.
My best bet would be to have a list in my product object, with CountryIds (Ids of countries that the product is sold in). But I cannot find a query parameter in NEST to find all products whose "CountryIds" list contain the given ID (which I know at runtime). Basically I would like some help on how to write the contents of this method through elastic search.
Product[] GetProductsByCountryId(int countryId);
The Product class could look something like this:
class Product {
string productName;
int[] countryIds;
}