Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

形如 SELECT count(*) as count ,avg(reg_cap) as avg,name FROM enterprise limit 1,limit 参数丢失 #1243

Open
FuYouJ opened this issue Mar 18, 2024 · 1 comment

Comments

@FuYouJ
Copy link

FuYouJ commented Mar 18, 2024

这里预期应该会返回一条带name字段的文档。
但是解析后的结果,limit 1因为聚合的原因,被抛弃了。

{
  "from": 0,
  "size": 0,
  "_source": {
    "includes": [
      "COUNT",
      "AVG",
      "name"
    ],
    "excludes": []
  },
  "stored_fields": "name",
  "aggregations": {
    "count": {
      "value_count": {
        "field": "_index"
      }
    },
    "avg": {
      "avg": {
        "field": "reg_cap"
      }
    }
  }
}
@FuYouJ
Copy link
Author

FuYouJ commented Mar 18, 2024

在聚合里面,我们也会经常用到size参数吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant