Skip to content

When elasticsearch aggregation terms setting size is different, why do I get different DOC_counts even with the same doc_key #103487

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

Closed
shencangsheng opened this issue Dec 15, 2023 · 0 comments
Labels
>bug needs:triage Requires assignment of a team area label

Comments

@shencangsheng
Copy link

shencangsheng commented Dec 15, 2023

Elasticsearch Version

7.17

Installed Plugins

No response

Java Version

jdk8

OS Version

Linux genecast 5.4.0-153-generic x86_64 x86_64 x86_64 GNU/Linux

Problem Description

This is my aggregated DSL

{
  "aggregations": {
    "nested-gene5495": {
      "nested": {
        "path": "snv"
      },
      "aggregations": {
        "gene5495": {
          "terms": {
            "field": "snv.gene",
            "size": 10,
            "min_doc_count": 1,
            "shard_min_doc_count": 0,
            "show_term_doc_count_error": false,
            "order": [
              {
                "_count": "desc"
              },
              {
                "_key": "asc"
              }
            ]
          }
        }
      }
    }
  }
}

One result

{
  "key": "BRCA2",
  "doc_count": 18
}
}

When I set size to 20

{
  "key": "BRCA2",
  "doc_count": 21
}

Index Info:
Size: 2.5G
docs: 200w+
number_of_shards: 3

The expected quantity should be consistent

Steps to Reproduce

nested aggregations

Logs (if relevant)

No response

@shencangsheng shencangsheng added >bug needs:triage Requires assignment of a team area label labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

1 participant