choulinlin

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

  •  
  •   choulinlin · Feb 8, 2018 · 9591 views
    This topic created in 3190 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
    oaix
    Feb 8, 2018
    1
    最外层的 size 是限制 hits 的,如果要设置 terms 聚合的桶数量, 要在 field 那一层设置 size
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5287 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:14 · PVG 10:14 · LAX 18:14 · JFK 21:14
    ♥ Do have faith in what you're doing.