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

Index pattern: "_id" field marked as aggregatable #77206

Closed
flash1293 opened this issue Sep 10, 2020 · 2 comments
Closed

Index pattern: "_id" field marked as aggregatable #77206

flash1293 opened this issue Sep 10, 2020 · 2 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0

Comments

@flash1293
Copy link
Contributor

flash1293 commented Sep 10, 2020

Kibana version: master

Describe the bug:

When creating an index pattern, _id is mapped as an aggregatable string field. However it's not actually aggregatable and using it e.g. in a terms operation will result in an Elasticsearch error

Steps to reproduce:

  1. Go to Visualize
  2. Configure bar chart based on logs sample data
  3. Add x axis terms aggregation based on _id field
  4. Apply
  5. Error toast is shown

Expected behavior:
_id should not be shown in the dropdown at all

Screenshots (if relevant):

Screenshot 2020-09-10 at 18 12 44

Errors in browser console (if relevant):

{
   "statusCode":400,
   "error":"Bad Request",
   "message":"status_exception",
   "attributes":{
      "error":{
         "type":"status_exception",
         "reason":"error while executing search",
         "caused_by":{
            "type":"search_phase_execution_exception",
            "reason":"all shards failed",
            "phase":"query",
            "grouped":true,
            "failed_shards":[
               {
                  "shard":0,
                  "index":"kibana_sample_data_logs",
                  "node":"6l5pPGD_TPiXOil7W2YxsA",
                  "reason":{
                     "type":"illegal_argument_exception",
                     "reason":"Fielddata access on the _id field is disallowed, you can re-enable it by updating the dynamic cluster setting: indices.id_field_data.enabled"
                  }
               }
            ],
            "caused_by":{
               "type":"illegal_argument_exception",
               "reason":"Fielddata access on the _id field is disallowed, you can re-enable it by updating the dynamic cluster setting: indices.id_field_data.enabled",
               "caused_by":{
                  "type":"illegal_argument_exception",
                  "reason":"Fielddata access on the _id field is disallowed, you can re-enable it by updating the dynamic cluster setting: indices.id_field_data.enabled"
               }
            }
         }
      }
   }
}

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

Any additional context:

The code deriving the index pattern fields should probably be adjusted to not mark _id as aggregatable.

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppArch labels Sep 10, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@flash1293 flash1293 changed the title "_id" field marked as aggregatable Index pattern: "_id" field marked as aggregatable Sep 10, 2020
@mattkime
Copy link
Contributor

this is an ES bug - elastic/elasticsearch#62897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0
Projects
None yet
Development

No branches or pull requests

3 participants