This topic describes how to enable and configure the index feature for a Logstore.
Prerequisites
Background information
You must enable and configure the index feature for a Logstore before you can query
the log data that is stored in the Logstore. We recommend that you configure the index
feature for your Logstore based on your business requirements.
Note
- After you enable the index feature, the indexes occupy extra storage space and transferring the indexes occupies extra bandwidth.
- After you enable and configure the index feature for a Logstore, the update applies only to the log data that is newly written to the Logstore.
Log Service adds multiple system fields as key-value pairs to a log entry when writing
the log entry to a Logstore. If the index feature of a Logstore is enabled and configured,
you can search and analyze the log data in the Logstore based on the system fields.
System field | Description |
---|---|
__topic__ | The topic of a log entry. If a topic is specified for a log entry, Log Service adds this field to the log entry. The key of the field is __topic__ and the value is the log topic. For more information, see Configure a log topic. |
__source__ | The source of a log entry. |
__time__ | The timestamp of a log entry. |
Note By default, no delimiter to segment the values of the __topic__ and __source__ fields is defined. Therefore, only exact match is supported for the two fields.