Hi,
Hope you will be able to help me on this.
I have the following query
GET /catalog-20240302194411/_search
{
"aggs": {
"filtered_aggregations": {
"aggs": {
"paginated_unique_products": {
"aggs": {
"lowest_price": {
"top_hits": {
"size": 1,
"sort": [
{
"price": {
"order": "asc"
}
}
]
}
}
},
"composite": {
"size": 30,
"sources": [
{
"product": {
"terms": {
"field": "productId"
}
}
}
]
}
},
"accommodation_type_terms": {
"terms": {
"field": "accommodationTypes"
}
},
"boards_terms": {
"terms": {
"field": "boards"
}
},
"destination_terms": {
"terms": {
"field": "destinations"
}
},
"establishment_rating_terms": {
"terms": {
"field": "establishmentRatings"
}
},
"locations_terms": {
"terms": {
"field": "locations"
}
},
"notorious_brand_terms": {
"terms": {
"field": "notoriousBrand"
}
},
"payment_facilities_terms": {
"terms": {
"field": "paymentFacilities"
}
},
"thematics_terms": {
"terms": {
"field": "thematics"
}
}
},
"filter": {
"bool": {
"must": [
{
"terms": {
"destinations": [
6100004
]
}
},
{
"term": {
"siteId": {
"value": 1
}
}
}
]
}
}
}
},
"size": 0
}
I'm able to write it using the NEST client but since we are using Elasticsearch v8, I'm using the latest (v8.12) Elastic.Clients.Elasticsearch and I'm not able to write in c# the composite aggregration bassed on terms.
I did not find any documentation or examples.
Can you have a look a it please?
Thanks in advance.
Patrice