Skip to content

Error when creating a Top Hit aggregation #68883

@lizozom

Description

@lizozom

Kibana version:
master, doesn't happen in 7.8

Describe the bug:
Trying to create a Top Hit aggregation fails

Steps to reproduce:

  1. Load the a data set
  2. Create a new table visualization
  3. Choose a Top Hit metric aggregation
  4. Choose a keyword field

An error is shown:

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "[illegal_argument_exception] Field [category.keyword] of type [keyword] does not support custom formats",
  "attributes": {
    "error": {
      "root_cause": [
        {
          "type": "illegal_argument_exception",
          "reason": "Field [category.keyword] of type [keyword] does not support custom formats"
        }
      ],
      "type": "search_phase_execution_exception",
      "reason": "all shards failed",
      "phase": "query",
      "grouped": true,
      "failed_shards": [
        {
          "shard": 0,
          "index": "kibana_sample_data_ecommerce",
          "node": "YjD2azE0SrOEA6beW3T-2w",
          "reason": {
            "type": "illegal_argument_exception",
            "reason": "Field [category.keyword] of type [keyword] does not support custom formats"
          }
        }
      ],
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Field [category.keyword] of type [keyword] does not support custom formats",
        "caused_by": {
          "type": "illegal_argument_exception",
          "reason": "Field [category.keyword] of type [keyword] does not support custom formats"
        }
      }
    }
  }
}

Expected behavior:
Either

  • Invalid fields shouldn't be available for the user to choose or
  • Aggregation should work

Screenshots (if relevant):

image (2)

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

Metadata

Metadata

Assignees

Labels

Feature:AggregationsAggregation infrastructure (AggConfig, esaggs, ...)Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//bugFixes for quality problems that affect the customer experienceimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.loe:smallSmall Level of Effortregressionv7.9.0v8.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions