﻿---
title: Map fields in Streams
description: Map Streams fields to define how Elasticsearch stores and indexes your data, balancing query performance and storage cost.
url: https://www.elastic.co/elastic/docs-builder/docs/3716/solutions/observability/streams/map-fields
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud Serverless
  - Elastic Cloud on Kubernetes
  - Elastic Observability
  - Elastic Stack
  - Elasticsearch
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available since 9.2, Preview in 9.1
---

# Map fields in Streams
Field mappings define how Elasticsearch stores and indexes your data, balancing storage efficiency against query performance. You can map fields from the [**Processing** tab](#streams-map-fields-processing) or the [**Schema** tab](#streams-map-fields-processing).

## Mapped versus runtime fields

Unmapped fields can still be searched using [runtime fields](https://www.elastic.co/elastic/docs-builder/docs/3716/manage-data/data-store/mapping/runtime-fields), but at a higher query cost. Use this table to decide which approach fits your use case:

|                              | Mapped fields                                    | Runtime fields                                                   |
|------------------------------|--------------------------------------------------|------------------------------------------------------------------|
| **Query performance**        | Fast                                             | Slower                                                           |
| **Aggregations and sorting** | Fully supported                                  | Supported, but slower                                            |
| **Schema changes**           | Require re-indexing                              | No re-indexing needed                                            |
| **Best for**                 | Fields you query, filter, or aggregate regularly | Exploratory queries, infrequent lookups, or schema still in flux |

For most fields, **use mapped fields**. The performance benefit outweighs the extra storage for any field you use regularly — especially fields used in dashboards, filters, and aggregations. Use runtime fields when you're still exploring your data structure or for fields you rarely query.
For more background on field types and mapping, refer to the [mapping](https://www.elastic.co/elastic/docs-builder/docs/3716/manage-data/data-store/mapping) overview.

## Map fields from the Processing tab

After you create a [processor](https://www.elastic.co/elastic/docs-builder/docs/3716/solutions/observability/streams/parse-and-process), open the **Detected fields** tab to view any fields it extracted. Streams automatically attempts to map these fields so you can use them in queries.
From here, you can:
- Accept the suggested field mapping.
- Change an incorrect field mapping to the correct type.
- Remove the mapping from a field.


## Map fields from the Schema tab

The **Schema** tab provides an overview of how fields are defined within your stream.
- **Classic streams:** the **Schema** tab lists all fields found in the underlying index or index template. Each field shows its mapping status and type, either **Mapped** or **Unmapped**.
- **Wired streams:** <applies-to>Elastic Stack: Preview since 9.2</applies-to> <applies-to>Elastic Cloud Serverless: Preview</applies-to> the **Schema** tab determines field mappings by combining information from the current stream’s index and its parent streams. Fields with a type defined in a parent stream have the **Inherited** status. You can navigate to that parent stream to view or edit the mapping (except for fields defined in the root logs stream, which you can't modify).
  When you add a mapping to a wired stream, all of its child streams automatically inherit it.


### Edit mappings from the Schema tab

To edit field mappings from the **Schema** tab:
1. Open the **Field actions** menu by selecting the `boxes_vertical` icon.
2. Select **Map field**.
3. From the **Type** menu, select the field type.
4. Select **Stage changes** to save your updates.