Skip to content

Cannot run exists query on field with thousands of nested fields #17131

@merito

Description

@merito

Describe the feature: I've got some documents with field A and inside A are thousands of nested fields. I would like to run exists query to get documents with field A presents

{
  "query": {
    "bool": {
      "must": {
        "exists": {
          "field": "A"
        }
      }
    }
  }
}

but then I've got an error

"type": "too_many_clauses",
"reason": "maxClauseCount is set to 1024"

In my case there is one nested field exists in every A, so I can query for A.B, but what can I do if there is no common fields in A and I want to see all docs with A?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions