﻿---
title: Mapper size plugin
description: The mapper-size plugin provides the _size metadata field which, when enabled, indexes the size in bytes of the original _source field. 
url: https://www.elastic.co/elastic/docs-builder/docs/4493/reference/elasticsearch/plugins/mapper-size
products:
  - Elasticsearch
---

# Mapper size plugin
The mapper-size plugin provides the `_size` metadata field which, when enabled, indexes the size in bytes of the original [`_source`](https://www.elastic.co/elastic/docs-builder/docs/4493/reference/elasticsearch/mapping-reference/mapping-source-field) field.

## Installation

This plugin can be installed using the [plugin manager](https://www.elastic.co/elastic/docs-builder/docs/4493/reference/elasticsearch/command-line-tools/elasticsearch-plugin):
```sh
sudo bin/elasticsearch-plugin install mapper-size
```

The plugin must be installed on every node in the cluster, and each node must be restarted after installation.
You can also download this plugin for [offline install](/elastic/docs-builder/docs/4493/reference/elasticsearch/command-line-tools/elasticsearch-plugin#elasticsearch-plugin-ids). Download the build that matches the Elasticsearch version you are running.
<tab-set>
  <tab-item title="Latest">
    Download the build for 9.5.5:[[https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-9.5.5.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-9.5.5.zip)](https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-9.5.5.zip)To verify the `.zip` file, use the [SHA hash](https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-9.5.5.zip.sha512) or [ASC key](https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-9.5.5.zip.asc).
  </tab-item>

  <tab-item title="Specific version">
    Replace `<SPECIFIC.VERSION.NUMBER>` with the Elasticsearch version you are running. For example, you can replace `<SPECIFIC.VERSION.NUMBER>` with `9.0.0`.
    - To download the build for the plugin, use this link:
      ```text
      https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-<SPECIFIC.VERSION.NUMBER>.zip
      ```
    - To download the corresponding SHA hash to verify the `.zip` file, use this link:
      ```text
      https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-<SPECIFIC.VERSION.NUMBER>.zip.sha512
      ```
    - To download the corresponding PGP signature (`.asc`) to verify the `.zip` file, use this link:
      ```text
      https://artifacts.elastic.co/downloads/elasticsearch-plugins/mapper-size/mapper-size-<SPECIFIC.VERSION.NUMBER>.zip.asc
      ```
  </tab-item>
</tab-set>

The plugin manager installs plugins on a self-managed cluster. To install this plugin on Elastic Cloud Hosted, Elastic Cloud Enterprise, or Elastic Cloud on Kubernetes, refer to the [plugin installation instructions for your deployment type](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/4493/deploy-manage/plugins-and-custom-configuration-files#plugins-by-deployment-type).

## Removal

The plugin can be removed with the following command:
```sh
sudo bin/elasticsearch-plugin remove mapper-size
```

The node must be stopped before removing the plugin.