How to exclude system indices from all mapping list

Is it possible to not have the special index details in the all mapping result from elastic. for ex. .kibana_1 index mapping ?

curl -XGET "http://localhost:9200/_mapping"
this gives below output:

{
  "plan-index" : {
    "mappings" : {
      "properties" : {
        "carrier" : {
          "type" : "keyword"
        },
        "clientStore" : {
          "type" : "keyword"
        },
        "createdBy" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "createdTs" : {
          "type" : "date"
        },
        "deliveryAreas" : {
          "type" : "keyword"
        },
        "endTime" : {
          "type" : "date"
        },
        "id" : {
          "type" : "keyword"
        },
        "isLock" : {
          "type" : "boolean"
        },
        "modifiedBy" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "modifiedTs" : {
          "type" : "date"
        },
        "partitionKey" : {
          "type" : "keyword",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "planExternalStatus" : {
          "type" : "keyword"
        },
        "planRequestId" : {
          "type" : "keyword"
        },
        "planStatus" : {
          "type" : "keyword"
        },
        "serviceProvider" : {
          "type" : "keyword"
        },
        "startTime" : {
          "type" : "date"
        },
        "tagCounts" : {
          "type" : "keyword"
        },
        "tags" : {
          "type" : "keyword"
        },
        "vehicleIdentifier" : {
          "type" : "keyword"
        },
        "vehicleName" : {
          "type" : "keyword"
        }
      }
    }
  },
  ".kibana_1" : {
    "mappings" : {
      "dynamic" : "strict",
      "_meta" : {
        "migrationMappingPropertyHashes" : {
          "server" : "ec97f1c5da1a19609a60874e5af1c",
          "visualization" : "52d7a13ad68a150c4525b292d23ecc",
          "references" : "7997cf5a56cc02bdc9c93361bde7b0",
          "query" : "11aaeb7f5f7fa5bb43f25e1e26e7d9",
          "kql-telemetry" : "d12a98a6f19a2d2696597547e064ee",
          "ui-metric" : "0d409297dc5ebe1e3a1da696ee32e3",
          "type" : "2f4316de49999235636386fe5106c1",
          "url" : "c7f66a0df8b1b52f17c28c4a111105",
          "migrationVersion" : "4a1746014a75ade3a4e1db5763276f",
          "sample-data-telemetry" : "7d3cfeb915303c96419681967ffeb4",
          "index-pattern" : "66eccb05066c5a924f48a9e9736499",
          "search" : "181661168bbadd1eff59061e2a0d5c",
          "updated_at" : "00da57df13e94e9d984313ace4bfe0",
          "namespace" : "2f4316de49999235636386fe51dc06c1",
          "timelion-sheet" : "9a2a2748877c7b582fef201ab1d4cf",
          "config" : "87aca8fdb053154f113fce3dbf3edf",
          "dashboard" : "d00f614b29a80360e90193fd333bab",
          "tsvb-validation-telemetry" : "3a37ef6c87ae6fc97d5c7da00e9215"
        }
      },
      "properties" : {
        "config" : {
          "dynamic" : "true",
          "properties" : {
            "buildNum" : {
              "type" : "keyword"
            }
          }
        },
        "dashboard" : {
          "properties" : {
            "description" : {
              "type" : "text"
            },
            "hits" : {
              "type" : "integer"
            },
            "kibanaSavedObjectMeta" : {
              "properties" : {
                "searchSourceJSON" : {
                  "type" : "text"
                }
              }
            },
            "optionsJSON" : {
              "type" : "text"
            },
            "panelsJSON" : {
              "type" : "text"
            },
            "refreshInterval" : {
              "properties" : {
                "display" : {
                  "type" : "keyword"
                },
                "pause" : {
                  "type" : "boolean"
                },
                "section" : {
                  "type" : "integer"
                },
                "value" : {
                  "type" : "integer"
                }
              }
            },
            "timeFrom" : {
              "type" : "keyword"
            },
            "timeRestore" : {
              "type" : "boolean"
            },
            "timeTo" : {
              "type" : "keyword"
            },
            "title" : {
              "type" : "text"
            },
            "version" : {
              "type" : "integer"
            }
          }
        },
        "index-pattern" : {
          "properties" : {
            "fieldFormatMap" : {
              "type" : "text"
            },
            "fields" : {
              "type" : "text"
            },
            "intervalName" : {
              "type" : "keyword"
            },
            "notExpandable" : {
              "type" : "boolean"
            },
            "sourceFilters" : {
              "type" : "text"
            },
            "timeFieldName" : {
              "type" : "keyword"
            },
            "title" : {
              "type" : "text"
            },
            "type" : {
              "type" : "keyword"
            },
            "typeMeta" : {
              "type" : "keyword"
            }
          }
        },
        "kql-telemetry" : {
          "properties" : {
            "optInCount" : {
              "type" : "long"
            },
            "optOutCount" : {
              "type" : "long"
            }
          }
        },
        "migrationVersion" : {
          "type" : "object",
          "dynamic" : "true"
        },
        "namespace" : {
          "type" : "keyword"
        },
        "query" : {
          "properties" : {
            "description" : {
              "type" : "text"
            },
            "filters" : {
              "type" : "object",
              "enabled" : false
            },
            "query" : {
              "properties" : {
                "language" : {
                  "type" : "keyword"
                },
                "query" : {
                  "type" : "keyword",
                  "index" : false
                }
              }
            },
            "timefilter" : {
              "type" : "object",
              "enabled" : false
            },
            "title" : {
              "type" : "text"
            }
          }
        },
        "references" : {
          "type" : "nested",
          "properties" : {
            "id" : {
              "type" : "keyword"
            },
            "name" : {
              "type" : "keyword"
            },
            "type" : {
              "type" : "keyword"
            }
          }
        },
        "sample-data-telemetry" : {
          "properties" : {
            "installCount" : {
              "type" : "long"
            },
            "unInstallCount" : {
              "type" : "long"
            }
          }
        },
        "search" : {
          "properties" : {
            "columns" : {
              "type" : "keyword"
            },
            "description" : {
              "type" : "text"
            },
            "hits" : {
              "type" : "integer"
            },
            "kibanaSavedObjectMeta" : {
              "properties" : {
                "searchSourceJSON" : {
                  "type" : "text"
                }
              }
            },
            "sort" : {
              "type" : "keyword"
            },
            "title" : {
              "type" : "text"
            },
            "version" : {
              "type" : "integer"
            }
          }
        },
        "server" : {
          "properties" : {
            "uuid" : {
              "type" : "keyword"
            }
          }
        },
        "timelion-sheet" : {
          "properties" : {
            "description" : {
              "type" : "text"
            },
            "hits" : {
              "type" : "integer"
            },
            "kibanaSavedObjectMeta" : {
              "properties" : {
                "searchSourceJSON" : {
                  "type" : "text"
                }
              }
            },
            "timelion_chart_height" : {
              "type" : "integer"
            },
            "timelion_columns" : {
              "type" : "integer"
            },
            "timelion_interval" : {
              "type" : "keyword"
            },
            "timelion_other_interval" : {
              "type" : "keyword"
            },
            "timelion_rows" : {
              "type" : "integer"
            },
            "timelion_sheet" : {
              "type" : "text"
            },
            "title" : {
              "type" : "text"
            },
            "version" : {
              "type" : "integer"
            }
          }
        },
        "tsvb-validation-telemetry" : {
          "properties" : {
            "failedRequests" : {
              "type" : "long"
            }
          }
        },
        "type" : {
          "type" : "keyword"
        },
        "ui-metric" : {
          "properties" : {
            "count" : {
              "type" : "integer"
            }
          }
        },
        "updated_at" : {
          "type" : "date"
        },
        "url" : {
          "properties" : {
            "accessCount" : {
              "type" : "long"
            },
            "accessDate" : {
              "type" : "date"
            },
            "createDate" : {
              "type" : "date"
            },
            "url" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 2048
                }
              }
            }
          }
        },
        "visualization" : {
          "properties" : {
            "description" : {
              "type" : "text"
            },
            "kibanaSavedObjectMeta" : {
              "properties" : {
                "searchSourceJSON" : {
                  "type" : "text"
                }
              }
            },
            "savedSearchRefName" : {
              "type" : "keyword"
            },
            "title" : {
              "type" : "text"
            },
            "uiStateJSON" : {
              "type" : "text"
            },
            "version" : {
              "type" : "integer"
            },
            "visState" : {
              "type" : "text"
            }
          }
        }
      }
    }
  }
}

I want to avoid the .kibana_1 from this output. How can we do that ?

@DineshNaik

What version are you on? The reason I ask is in 8.x what you are asking for is now the default behavior. The system indices are "Hidden" from most commands by default.

@stephenb I am using 7.6 as of now.
Can we achieve this in my current version ie. 7.6?

try
GET /*,-.*/_mapping

1 Like

FYI 7.6 is EOL and you should really upgrade as a matter of urgency.

thanks Stephen ,
it works.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.