choulinlin

聚合搜索 设置 size:0 无效 elasticsearch 6.1.2

  •  
  •   choulinlin · Feb 8, 2018 · 7345 views
    This topic created in 3077 days ago, the information mentioned may be changed or developed.

    curl -XPOST { "size" : 0, "aggs": { "group_by_state": { "terms": { "field": "brand_id" } } } } 结果还是只返回 10 行数据 ,sum_other_doc_count 不为 0

    oaix
        1
    oaix  
       Feb 8, 2018
    最外层的 size 是限制 hits 的,如果要设置 terms 聚合的桶数量, 要在 field 那一层设置 size
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3166 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 285ms · UTC 13:10 · PVG 21:10 · LAX 06:10 · JFK 09:10
    ♥ Do have faith in what you're doing.