Skip to content

Fields of type 'match_only_text' in tsdb indices are missing in the _source #97320

@martijnvg

Description

@martijnvg

If tsdb is enabled and the mapping contains fields of type match_only_text then these fields are not visible in the _source
in the search response.

Reproduction of this issue:

 PUT _index_template/my-weather-sensor-index-template { "index_patterns": [ "metrics-weather_sensors-*" ], "data_stream": {}, "template": { "settings": { "index.mode": "time_series", "index.routing_path": [ "sensor_id", "location" ], "index.look_ahead_time": "3h" }, "mappings": { "properties": { "sensor_id": { "type": "keyword", "time_series_dimension": true }, "location": { "type": "keyword", "time_series_dimension": true }, "temperature": { "type": "half_float", "time_series_metric": "gauge" }, "humidity": { "type": "half_float", "time_series_metric": "gauge" }, "@timestamp": { "type": "date", "format": "strict_date_optional_time" }, "message": { "type": "match_only_text" } } } }, "priority": 500, "_meta": { "description": "Template for my weather sensor data" } } DELETE _data_stream/metrics-weather_sensors-dev POST /metrics-weather_sensors-dev/_doc { "@timestamp": "2023-07-04T11:21:15.000Z", "sensor_id": "HAL-000001", "location": "plains", "temperature": 26.7, "humidity": 49.9, "message": "hey" } POST /metrics-weather_sensors-dev/_doc { "@timestamp": "2023-07-04T11:25:42.000Z", "sensor_id": "SYKENET-000001", "location": "swamp", "temperature": 32.4, "humidity": 88.9, "message": "you" } GET /metrics-weather_sensors-dev/_search 

The search response will not contain the message field in the _source and this field should exist.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions