This topic describes how to use the cluster management system of LindormSearch to manage collections.
Terms
-
Collection: An index table.
-
Shard: A partition of a collection.
-
Replica: A copy of a shard.
Create a collection
-
Log on to the search engine's cluster management system.
-
In the left-side navigation pane, click Collections.
-
Click Add Collection.

The following table describes the main parameters.
Parameter
Description
name
The name of the collection.
config set
The configuration set for the collection. The default value is
_indexer_default.numShards
The number of shards for the collection. We recommend that you set this value to a multiple of the number of nodes. For example, if the search engine has 2 nodes, you can set numShards to
2or4. Note the limit imposed by maxShardsPerNode.replicationFactor
The number of replicas for each shard. The default value is
1.maxShardsPerNode
The maximum number of shards from this collection allowed per node. The default value is
1.NoteThese settings must satisfy the following formula:
maxShardsPerNode × number of nodes ≥ numShards × replicationFactor. Otherwise, collection creation fails.autoAddReplica
Specifies whether to automatically create a replica on another node if the hosting node becomes unavailable. We recommend that you set this parameter to
True. -
Click Add Collection in the dialog box.
Write data
-
In the left-side navigation pane, select your collection from the Collection Selector drop-down list.
-
Select Documents to open the data entry page.
-
From the Document Type drop-down list, select CSV.
-
In the Document(s) text area, enter the following data.
id,update_version_l,name_s,age_i 1,1,zhangsan,10 2,2,lisi,20 3,3,wangwu,30
NoteThis example adds three rows of data, each with four columns. The
idandupdate_version_lcolumns are system-defined and required. The _s suffix in name_s indicates a string type, and the _i suffix in age_i indicates an integer type. -
Click Submit Document.
Query data
-
In the left-side navigation pane, click Query.
-
In the q text box, enter your query criteria.
-
Click Execute Query. The results are shown in the following figure.

Delete a collection
-
In the left-side navigation pane, click Collections.
-
Select the collection and click Delete.
-
In the Collection text box, enter the name of the collection.
-
Click Delete.
