All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Configure indexes

Last updated:2020-12-28 14:55:51

Overview

Before you use KLog to query log data or perform SQL analytics, configure indexes. The indexes include the full-text index and field index.

Type Description
Full-text index The index in the text format is created for the values of all fields, and the values are segmented based on the delimiters.
Field index After you add a field to the field index, you can use the field to query and aggregate data.

Note

  • If both the full-text index and field index are configured, the configuration of the field index prevails.
  • If you add a field to the field index, the full-text index of this field remains effective.
  • Only a field that has been added to the field index can be used to query and aggregate data.

Configure indexes

  1. Log in to the KLog console and click Projects in the left navigation pane. The Projects page appears. Click the name of a project. The project details page appears. Click Log Query in the left navigation pane. On the Log Query page, select a LogPool.
  2. Click Configure Index in the upper-right corner to configure indexes.

configure.png

  • Full-text index
Parameter Description
Case-sensitive Specifies whether the query keywords are case-sensitive.
Delimiters The delimiters that are used to segment the values of log data to multiple keywords.
  • Field index
Parameter Description
Field Name Required. The name of the field.
Data Type Required. The data type of the field. KLog supports the following four data types: text, long, double, and date.
Alias Optional. The alias of the field. KLog allows you to query data based on field aliases. You can configure the same alias for different fields. In this case, data is queried based on the alias in all these fields.
Case-sensitive Specifies whether the query keywords are case-sensitive. By default, this parameter is disabled.
Delimiters The delimiters that are used to segment the values of log data to multiple keywords. You need to configure the delimiters only when the data type of the field is text.
  1. Click OK to complete the index configuration.

Note

After you save the index configuration, it takes effect only on data that is written after the configuration is saved. If you want to query historical data, you must use the historical index configuration.

Refresh indexes

  1. If log data changes, the earlier index configuration cannot meet the query requirements for the current data. You must reconfigure indexes. Click Configure Index. On the page that appears, click Refresh Indexes to obtain the field index attributes of the latest log data.

refresh index.png

  1. The index attributes cannot be modified. To modify the index attributes, click Reference to load the index attributes to the Configure Index page and then configure index rules as required.
  2. Click OK to complete the index configuration.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback