Query index details

Updated at:

Run a CLI command to query the index configuration of a specified LogStore.

Prerequisites

Before you run the CLI command, make sure that the following requirements are met:

  • SLS is activated. For more information, see Getting started with Simple Log Service.

  • The SLS CLI is installed and configured. For more information, see Install the CLI and Configure the CLI.

  • A project and a LogStore are created. For more information, see Create a project and Create a LogStore.

Command syntax

aliyun sls get-index --project=<value> --logstore=<value>

Parameters

The following table describes the required and command-specific parameters.

Parameter

Type

Required

Example

Description

--project

String

Yes

aliyun-test-project

The name of the project.

--logstore

String

Yes

aliyun-test-logstore

The name of the LogStore.

For information about global parameters, see Global parameters.

Command examples

  • Command example

Query the index configuration of the LogStore named aliyun-test-logstore.

aliyun sls get-index --project="aliyun-test-project" --logstore="aliyun-test-logstore"
  • Response example

{
  "line": {
    "caseSensitive": false,
    "chn": false,
    "token": [",", " ", ";", "=", "(", ")", "[", "]", "{", "}", ":", "\n", "\t", "\r"]
  },
  "keys": {
    "status": {
      "type": "long",
      "doc_value": true
    },
    "region": {
      "type": "text",
      "doc_value": true,
      "caseSensitive": false,
      "chn": false
    }
  }
}