Elasticsearch significant terms minimum

137 Views Asked by At

I've got something like this:

GET index_*/_search?search_type=count
{
  "aggs": {
    "products": {
      "terms": {
        "field": "products_id",
        "size": 100
      },
      "aggs": {
        "significant_products": {
          "significant_terms": {
            "field": "also_purchased_id",
            "size": 40
          }
        }
      }
    }
  }
}

And i want to say significant_terms to give me more results. It gives sometimes only 10 even when the doc_count says 400. If i add "min_doc_count": 10 to significant terms its just doing weird things. Some keys won't give me any result and some just 3 oder 4? So how can i do that?

Thanks!

0

There are 0 best solutions below