All Products
Search
Document Center

Lindorm:Manage collections

Last Updated:Jul 19, 2025

This topic describes how to manage index tables using the cluster management system.

Terms

  • Collection: A collection is an index table in LindormSearch.

  • Shard: A shard refers to a shard of a collection.

  • Replica: A replica refers to a replica of a shard of a collection.

Create a collection

  1. Log on to the cluster management system provided by the LindormSearch search engine service.

  2. In the navigation pane on the left, click Collections.

  3. Click Add Collection.

    Create a collection

    Configure the parameters described in the following table.

    Parameter

    Description

    name

    The name of the collection.

    config set

    The configuration set of the collection. Default value: _indexer_default.

    numShards

    The number of shards of the collection. We recommend that you set the value of this parameter to an integer multiple of the number of the LindormSearch nodes in your Lindorm instance. For example, if the Lindorm instance contains two LindormSearch nodes, you can set the value of numShards to 2 or 4. The value of the numShards parameter must be smaller than the value of the MaxShardsPerNode parameter.

    replicationFactor

    The number of replicas of each shard of the collection. Default value: 1.

    maxShardsPerNode

    The maximum number of shards on each node. Default value: 1.

    Note

    The values that you specify for the corresponding parameters must meet following condition: maxShardsPerNode × Number of nodes ≥ numShards × replicationFactor. Otherwise, the system fails to create the collection.

    autoAddReplica

    Specifies whether to restore shards on other nodes when the node on which specific shards reside becomes unavailable. We recommend that you set this parameter to True.

  4. Click Add Collection in the dialog box.

Write data

  1. In the navigation pane on the left, select the name of the created collection from the Collection Selector drop-down list.

  2. Click Documents to go to the data writing page.

  3. Select CSV from the Document Type drop-down list.

  4. Enter the following code in the Document(s) field.

    id,update_version_l,name_s,age_i
    1,1,zhangsan,10
    2,2,lisi,20
    3,3,wangwu,30

    写入数据

    Note

    The preceding sample code writes three rows of data. Each row includes four columns. The id column and update_version_l column are required because they are system-defined columns. The suffix _s of name_s indicates that the column is of the STRING data type, and the suffix _i of age_i indicates that the column is of the INTEGER data type.

  5. Click Submit Document.

Query data

  1. In the navigation pane on the left, click Query.

  2. Enter conditions in the q field.

  3. Click Execute Query. The following figure shows the query result.

    Query data

Delete index

  1. In the navigation pane on the left, click Collections.

  2. Select the target collection and click Delete.

  3. Enter the name of the target collection in the Collection text box, as shown in the following figure.

    Delete a collection

  4. Click Delete.