commercetools

Product Projection Search with Facets details alone. Need to avoid result array


Is there any way when I am searching products for one category just for facets alone. In this call I want to avoid result array Example :

{
    "limit": 20,
    "offset": 0,
    "count": 20,
    "total": 24,
    "results": [],
     "facets":{
 "variants.attributes.productStyle.en-GB": {
                    }
}

There can be 20 products, but I need only facets results alone to avoid huge data coming to service. If there is any query It would be great.


Solution

  • Yes, for getting no products returned set the limit parameter to 0 in your API request.