Elasticsearch重要条款最低

时间:2015-01-30 11:52:08

标签: elasticsearch aggregation minimum significant-terms

我有这样的事情:

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
          }
        }
      }
    }
  }
}

我想说significant_terms给我更多的结果。即使doc_count表示400,它有时也只提供10个。如果我将" min_doc_count":10添加到重要的术语中它只做奇怪的事情。有些钥匙不能给我任何结果,有些只是3点4?那我怎么能这样做呢?

谢谢!

0 个答案:

没有答案